-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add missing_dims argument allowing isel() to ignore missing dimensions #3923
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Thanks @johnomotani ; appreciate the PR. I'm not strongly opposed to this. I haven't personally had an instance where I've wanted this keyword, but that's not overly representative of others' cases. Separately, if we do merge, I think we should align with the keywords on |
|
I don't see why +1 for using the |
|
The Linux-py38-upstream-dev test is failing in cftime tests at various places similar to this Don't think it's related to this PR... |
|
you're right, that's #3928 |
Matches the possible values used elsewhere for drop_vars arguments.
|
Great, thanks a lot @johnomotani ! |
* master: Use divergent colormap if lowest and highest level span 0 (pydata#3913) Bugfix for plotting transposed 2d coords (pydata#3934) Allow plotting bool data (pydata#3766) facetgrid: fix case when vmin == vmax (pydata#3916) add a CI that tests xarray with all optional dependencies but dask (pydata#3919) Add missing_dims argument allowing isel() to ignore missing dimensions (pydata#3923) Only fail if a specific warning occurs (pydata#3930) Fix minor code quality issues (pydata#3626) Fix for stack+groupby+apply w/ non-increasing coord (pydata#3906) reactivate the macos CI (pydata#3920) add pint to the output of show_versions() (pydata#3918)
Note: only added to
DataArray.isel()andVariable.isel(). ADatasetshould include all dimensions, so presumably it should always be an error to pass a non-existent dimension when slicing aDataset?iselto ignore missing dimensions? #3866isort -rc . && black . && mypy . && flake8whats-new.rstfor all changes andapi.rstfor new API