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
I was trying to select by non dimensional coordinate, and I found that "where" works well, but it erase the name of my datarray only if filtering is done with another datarray as a non dimensional coordinate
I think that selecting with a datarray should not change the label of the data.
Further I was expecting that as for "sel", "where" should change the title of the graph
so that I know from the title that I performed a selection with where with a non dimensional coordinate
The text was updated successfully, but these errors were encountered:
We currently drop names because that's our default behavior for xarray operations with multiple named arguments. But the where method uses apply_ufunc() with keep_attrs=True, which indicates that attributes from the first object should be kept. It would probably make sense to keep the name of the first object, too, when using keep_attrs=True. That would fix this issue and also fix the problem for other xarray methods (e.g., fillna) that use the same logic internally.
I was trying to select by non dimensional coordinate, and I found that "where" works well, but it erase the name of my datarray only if filtering is done with another datarray as a non dimensional coordinate
this line would produce a label near color bar
but only using a numpy array this happens as here
Expected Output
I think that selecting with a datarray should not change the label of the data.
Further I was expecting that as for "sel", "where" should change the title of the graph
so that I know from the title that I performed a selection with where with a non dimensional coordinate
The text was updated successfully, but these errors were encountered: