-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
Is your feature request related to a problem? Please describe.
I am trying to drop particular indices from a dimension that doesn't have coordinates.
Following: drop_sel() documentation,
but leaving out the coordinate labels:
data = np.random.randn(2, 3)
ds = xr.Dataset({"A": (["x", "y"], data)})
ds.drop_sel(y=[1])gives me an error.
Describe the solution you'd like
I would think drop_isel should exist and work in analogy to drop_sel as isel does to sel.
Describe alternatives you've considered
As far as I know, I could either create coordinates especially to in order to drop, or rebuild a new dataset. Both are not congenial. (I'd be grateful to know if there is actually a straightforward way to do this I've overlooked.