Version
2026.8.0
How did you install UXarray?
Source
What happened?
Uxarray object typing gets lost during binary math operations with xarray objects when the xarray object appears first.
What did you expect to happen?
I expected that mathematical calculations including uxarray objects and xarray objects should give uxarray object results, regardless of which kind of object appears earlier.
Can you provide a MCVE to repoduce the bug?
import uxarray as ux
import xarray as xr
uxarr = ux.tutorial.open_dataset('quad-hexagon')['t2m']
# expecting UxDataArray but got xarray.DataArray:
xr.DataArray(7) * uxarr
# meanwhile, putting the uxarr object first correctly gives UxDataArray:
uxarr * xr.DataArray(7)
# (this is extra confusing because the two are mathematically equivalent...)
Version
2026.8.0
How did you install UXarray?
Source
What happened?
Uxarray object typing gets lost during binary math operations with xarray objects when the xarray object appears first.
What did you expect to happen?
I expected that mathematical calculations including uxarray objects and xarray objects should give uxarray object results, regardless of which kind of object appears earlier.
Can you provide a MCVE to repoduce the bug?