Version
v2026.8.0
How did you install UXarray?
Source
What happened?
When using .isel() from a UxDataArray or UxDataset, and supplying an xr.DataArray as the indexer for a grid dimension, the xr.DataArray's coordinates are not included in the result.
What did you expect to happen?
I expected the xr.DataArray's coordinates to be included in the result where possible, consistently with xarray's behavior. See, e.g.: https://docs.xarray.dev/en/stable/user-guide/indexing.html#more-advanced-indexing
Can you provide a MCVE to repoduce the bug?
import uxarray as ux
obj = ux.tutorial.open_dataset('quad-hexagon')
result = obj.isel(n_face=xr.DataArray(0, coords={'newcoord': 7}))
print(result.coords)
# expected 'newcoord' to be in result.coords, but it was not.
# to see the corresponding xarray behavior, can try:
result = obj.to_xarray().isel(n_face=xr.DataArray(0, coords={'newcoord': 7}))
print(result.coords)
# (in this case, 'newcoord' is indeed in result.coords)
Version
v2026.8.0
How did you install UXarray?
Source
What happened?
When using
.isel()from aUxDataArrayorUxDataset, and supplying anxr.DataArrayas the indexer for a grid dimension, thexr.DataArray's coordinates are not included in the result.What did you expect to happen?
I expected the
xr.DataArray's coordinates to be included in the result where possible, consistently withxarray's behavior. See, e.g.: https://docs.xarray.dev/en/stable/user-guide/indexing.html#more-advanced-indexingCan you provide a MCVE to repoduce the bug?