You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Boolean indexer arrays (or array-like objects) along grid dimensions are not handled properly by UxDataArray.isel() and UxDataset.isel(). Providing boolean indexes leads to them all being converted to 0s and 1s, so the result just has many copies of elements 0 and 1.
What did you expect to happen?
I expected boolean indexes to be treated as instructions for whether each element should be included; only elements where the indexer's value is True should be kept in the result (consistent with numpy array indexing and xarray indexing).
Can you provide a MCVE to repoduce the bug?
importuxarrayasuxarr=ux.tutorial.open_dataset("quad-hexagon")['t2m']
assertarr.sizes['n_face'] ==4arr.isel(n_face=[True, False, False, False])
# expected UxDataArray with size 1 along n_face; got size 4.# the following works as expected:arr.to_xarray().isel(n_face=[True, False, False, False])
Activity