-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Remove unvetted DataTree methods #9585
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
be1e0f9
Remove unvetted DataTree methods
shoyer 2ddf241
groups docstring
shoyer 7b4178e
Merge branch 'main' into remove-dt-methods
shoyer b3be878
comment out removed DataTree methods
shoyer 4259f1e
update quick overview on DataTree
shoyer 9d1a1d0
Merge branch 'main' into remove-dt-methods
shoyer a523d59
doc fixes suggested by Tom
shoyer d46514b
Merge branch 'main' into remove-dt-methods
shoyer 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 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 |
---|---|---|
|
@@ -705,16 +705,16 @@ Pathlib-like Interface | |
DataTree.parents | ||
DataTree.relative_to | ||
|
||
Missing: | ||
.. Missing: | ||
|
||
.. | ||
.. .. | ||
|
||
``DataTree.glob`` | ||
``DataTree.joinpath`` | ||
``DataTree.with_name`` | ||
``DataTree.walk`` | ||
``DataTree.rename`` | ||
``DataTree.replace`` | ||
.. ``DataTree.glob`` | ||
.. ``DataTree.joinpath`` | ||
.. ``DataTree.with_name`` | ||
.. ``DataTree.walk`` | ||
.. ``DataTree.rename`` | ||
.. ``DataTree.replace`` | ||
|
||
DataTree Contents | ||
----------------- | ||
|
@@ -725,17 +725,18 @@ Manipulate the contents of all nodes in a ``DataTree`` simultaneously. | |
:toctree: generated/ | ||
|
||
DataTree.copy | ||
DataTree.assign_coords | ||
DataTree.merge | ||
DataTree.rename | ||
DataTree.rename_vars | ||
DataTree.rename_dims | ||
DataTree.swap_dims | ||
DataTree.expand_dims | ||
DataTree.drop_vars | ||
DataTree.drop_dims | ||
DataTree.set_coords | ||
DataTree.reset_coords | ||
|
||
.. DataTree.assign_coords | ||
.. DataTree.merge | ||
.. DataTree.rename | ||
.. DataTree.rename_vars | ||
.. DataTree.rename_dims | ||
.. DataTree.swap_dims | ||
.. DataTree.expand_dims | ||
.. DataTree.drop_vars | ||
.. DataTree.drop_dims | ||
.. DataTree.set_coords | ||
.. DataTree.reset_coords | ||
|
||
DataTree Node Contents | ||
---------------------- | ||
|
@@ -760,129 +761,129 @@ Compare one ``DataTree`` object to another. | |
DataTree.equals | ||
DataTree.identical | ||
|
||
Indexing | ||
-------- | ||
|
||
Index into all nodes in the subtree simultaneously. | ||
|
||
.. autosummary:: | ||
:toctree: generated/ | ||
|
||
DataTree.isel | ||
DataTree.sel | ||
DataTree.drop_sel | ||
DataTree.drop_isel | ||
DataTree.head | ||
DataTree.tail | ||
DataTree.thin | ||
DataTree.squeeze | ||
DataTree.interp | ||
DataTree.interp_like | ||
DataTree.reindex | ||
DataTree.reindex_like | ||
DataTree.set_index | ||
DataTree.reset_index | ||
DataTree.reorder_levels | ||
DataTree.query | ||
|
||
.. | ||
|
||
Missing: | ||
``DataTree.loc`` | ||
|
||
|
||
Missing Value Handling | ||
---------------------- | ||
|
||
.. autosummary:: | ||
:toctree: generated/ | ||
|
||
DataTree.isnull | ||
DataTree.notnull | ||
DataTree.combine_first | ||
DataTree.dropna | ||
DataTree.fillna | ||
DataTree.ffill | ||
DataTree.bfill | ||
DataTree.interpolate_na | ||
DataTree.where | ||
DataTree.isin | ||
|
||
Computation | ||
----------- | ||
|
||
Apply a computation to the data in all nodes in the subtree simultaneously. | ||
|
||
.. autosummary:: | ||
:toctree: generated/ | ||
|
||
DataTree.map | ||
DataTree.reduce | ||
DataTree.diff | ||
DataTree.quantile | ||
DataTree.differentiate | ||
DataTree.integrate | ||
DataTree.map_blocks | ||
DataTree.polyfit | ||
DataTree.curvefit | ||
|
||
Aggregation | ||
----------- | ||
|
||
Aggregate data in all nodes in the subtree simultaneously. | ||
|
||
.. autosummary:: | ||
:toctree: generated/ | ||
|
||
DataTree.all | ||
DataTree.any | ||
DataTree.argmax | ||
DataTree.argmin | ||
DataTree.idxmax | ||
DataTree.idxmin | ||
DataTree.max | ||
DataTree.min | ||
DataTree.mean | ||
DataTree.median | ||
DataTree.prod | ||
DataTree.sum | ||
DataTree.std | ||
DataTree.var | ||
DataTree.cumsum | ||
DataTree.cumprod | ||
|
||
ndarray methods | ||
--------------- | ||
|
||
Methods copied from :py:class:`numpy.ndarray` objects, here applying to the data in all nodes in the subtree. | ||
|
||
.. autosummary:: | ||
:toctree: generated/ | ||
|
||
DataTree.argsort | ||
DataTree.astype | ||
DataTree.clip | ||
DataTree.conj | ||
DataTree.conjugate | ||
DataTree.round | ||
DataTree.rank | ||
|
||
Reshaping and reorganising | ||
-------------------------- | ||
|
||
Reshape or reorganise the data in all nodes in the subtree. | ||
|
||
.. autosummary:: | ||
:toctree: generated/ | ||
|
||
DataTree.transpose | ||
DataTree.stack | ||
DataTree.unstack | ||
DataTree.shift | ||
DataTree.roll | ||
DataTree.pad | ||
DataTree.sortby | ||
DataTree.broadcast_like | ||
.. Indexing | ||
.. -------- | ||
|
||
.. Index into all nodes in the subtree simultaneously. | ||
|
||
.. .. autosummary:: | ||
.. :toctree: generated/ | ||
|
||
.. DataTree.isel | ||
.. DataTree.sel | ||
.. DataTree.drop_sel | ||
.. DataTree.drop_isel | ||
.. DataTree.head | ||
.. DataTree.tail | ||
.. DataTree.thin | ||
.. DataTree.squeeze | ||
.. DataTree.interp | ||
.. DataTree.interp_like | ||
.. DataTree.reindex | ||
.. DataTree.reindex_like | ||
.. DataTree.set_index | ||
.. DataTree.reset_index | ||
Comment on lines
+782
to
+785
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. Unclear to me whether these methods would count as "manipulating structure" or "manipulating data"... |
||
.. DataTree.reorder_levels | ||
.. DataTree.query | ||
|
||
.. .. | ||
|
||
.. Missing: | ||
.. ``DataTree.loc`` | ||
shoyer marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
|
||
.. Missing Value Handling | ||
.. ---------------------- | ||
|
||
.. .. autosummary:: | ||
.. :toctree: generated/ | ||
|
||
.. DataTree.isnull | ||
.. DataTree.notnull | ||
.. DataTree.combine_first | ||
.. DataTree.dropna | ||
.. DataTree.fillna | ||
.. DataTree.ffill | ||
.. DataTree.bfill | ||
.. DataTree.interpolate_na | ||
.. DataTree.where | ||
.. DataTree.isin | ||
|
||
.. Computation | ||
.. ----------- | ||
|
||
.. Apply a computation to the data in all nodes in the subtree simultaneously. | ||
|
||
.. .. autosummary:: | ||
.. :toctree: generated/ | ||
|
||
.. DataTree.map | ||
.. DataTree.reduce | ||
.. DataTree.diff | ||
.. DataTree.quantile | ||
.. DataTree.differentiate | ||
.. DataTree.integrate | ||
.. DataTree.map_blocks | ||
.. DataTree.polyfit | ||
.. DataTree.curvefit | ||
|
||
.. Aggregation | ||
.. ----------- | ||
|
||
.. Aggregate data in all nodes in the subtree simultaneously. | ||
|
||
.. .. autosummary:: | ||
.. :toctree: generated/ | ||
|
||
.. DataTree.all | ||
.. DataTree.any | ||
.. DataTree.argmax | ||
.. DataTree.argmin | ||
.. DataTree.idxmax | ||
.. DataTree.idxmin | ||
.. DataTree.max | ||
.. DataTree.min | ||
.. DataTree.mean | ||
.. DataTree.median | ||
.. DataTree.prod | ||
.. DataTree.sum | ||
.. DataTree.std | ||
.. DataTree.var | ||
.. DataTree.cumsum | ||
.. DataTree.cumprod | ||
|
||
.. ndarray methods | ||
.. --------------- | ||
|
||
.. Methods copied from :py:class:`numpy.ndarray` objects, here applying to the data in all nodes in the subtree. | ||
|
||
.. .. autosummary:: | ||
.. :toctree: generated/ | ||
|
||
.. DataTree.argsort | ||
.. DataTree.astype | ||
.. DataTree.clip | ||
.. DataTree.conj | ||
.. DataTree.conjugate | ||
.. DataTree.round | ||
.. DataTree.rank | ||
|
||
.. Reshaping and reorganising | ||
.. -------------------------- | ||
|
||
.. Reshape or reorganise the data in all nodes in the subtree. | ||
|
||
.. .. autosummary:: | ||
.. :toctree: generated/ | ||
|
||
.. DataTree.transpose | ||
.. DataTree.stack | ||
.. DataTree.unstack | ||
.. DataTree.shift | ||
.. DataTree.roll | ||
.. DataTree.pad | ||
.. DataTree.sortby | ||
.. DataTree.broadcast_like | ||
|
||
IO / Conversion | ||
=============== | ||
|
@@ -961,10 +962,10 @@ DataTree methods | |
DataTree.to_netcdf | ||
DataTree.to_zarr | ||
|
||
.. | ||
.. .. | ||
|
||
Missing: | ||
``open_mfdatatree`` | ||
.. Missing: | ||
.. ``open_mfdatatree`` | ||
|
||
Coordinates objects | ||
=================== | ||
|
@@ -1476,10 +1477,10 @@ Advanced API | |
backends.list_engines | ||
backends.refresh_engines | ||
|
||
.. | ||
.. .. | ||
|
||
Missing: | ||
``DataTree.set_close`` | ||
.. Missing: | ||
.. ``DataTree.set_close`` | ||
|
||
Default, pandas-backed indexes built-in Xarray: | ||
|
||
|
This file contains 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.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was the decision here that these methods should act locally rather than mapping over the subtree? And the distinction being between methods which manipulate structure versus methods which manipulate data - the latter map over the whole tree?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had not thought about how these methods should work, I was just removing them from the docs because they no longer have an implementation!
That said, my inclination is that mapping over the subtree is probably appropriate for all of these. But many will probably need some special handling so they don't raise errors about missing variables/dimensions.