-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
drop_vars; deprecate drop for variables #3475
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
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
399f9d6
Deprecate drop for vars, in favor of drop_vars
max-sixty 222a31b
Merge branch 'master' into drop
max-sixty 5a2604c
docs tweaks
max-sixty 5126bd1
handle scalars as vars
max-sixty 3651ed8
allow warning in old whatsnew
max-sixty 64007ac
Merge branch 'master' into drop
max-sixty 1284cd2
Merge branch 'master' into drop
max-sixty e72693b
add drop_sel, adjust deprecations based on comments
max-sixty a8467c1
whatsnew
max-sixty 4b8db19
docs
max-sixty 13d6cab
old-whatsnew
max-sixty a8dab28
docstring
max-sixty 7002cb3
pendingdeprecationwarning
max-sixty 5570643
whatsnew
max-sixty 3997292
whatsnew
max-sixty 0de1411
move units tests to drop_sel
max-sixty db4b2a3
is_scalar (but retain isinstance for mypy)
max-sixty File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,6 +38,12 @@ Breaking changes | |
|
||
New Features | ||
~~~~~~~~~~~~ | ||
- :py:meth:`Dataset.drop_sel` & :py:meth:`DataArray.drop_sel` have been added for dropping labels. | ||
:py:meth:`Dataset.drop_vars` & :py:meth:`DataArray.drop_vars` have been added for | ||
dropping variables (including coordinates). The existing ``drop`` methods remain as a backward compatible | ||
option for dropping either lables or variables, but using the more specific methods is encouraged. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. lables > labels |
||
(:pull:`3475`) | ||
By `Maximilian Roos <https://github.com/max-sixty>`_ | ||
- :py:meth:`Dataset.transpose` and :py:meth:`DataArray.transpose` now support an ellipsis (`...`) | ||
to represent all 'other' dimensions. For example, to move one dimension to the front, | ||
use `.transpose('x', ...)`. (:pull:`3421`) | ||
|
@@ -3752,6 +3758,7 @@ Enhancements | |
explicitly listed variables or index labels: | ||
|
||
.. ipython:: python | ||
:okwarning: | ||
|
||
# drop variables | ||
ds = xray.Dataset({'x': 0, 'y': 1}) | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.