Using .sel
with a list of booleans, but for a boolean dtype
dimension raises weird errors
#9917
Labels
needs triage
Issue that has not been reviewed by xarray team member
What is your issue?
Take this MWE:
It fails with:
However, using:
Doesn't fail, but it squeezes
bool_dim
to a 0 size array, and I don't want that to happen, since want to end up with abool_dim
of size 1, and I don't want to use.expand_dims
because I have a non-dimension coordinate attached to thatbool_dim
and I lose that attachment information due to #4501 .I managed to find the following workaround using
isel
:But it is not very elegant of course :).
EDIT:
Perhaps this is a duplicate of #4892 , but there no error is mentioned.
The text was updated successfully, but these errors were encountered: