-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add DataTree.prune() method … #10598
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
base: main
Are you sure you want to change the base?
Conversation
│ │ │ - Add is_data_empty property to check if node contains data variables with actual data │ │ - Add prune() method to remove empty nodes while preserving tree structure │ │ - Include comprehensive tests covering basic pruning, intermediate nodes, and filtering scenarios │ │ - Useful for cleaning up DataTree after time-based filtering operations
…adinor/xarray into feature/datatree-prune-method
Co-authored-by: Tom Nicholas <tom@earthmover.io>
Co-authored-by: Tom Nicholas <tom@earthmover.io>
for more information, see https://pre-commit.ci
…adinor/xarray into feature/datatree-prune-method
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.
Can you also add a sentence to the end of this section of the documentation just saying something like "If you want to filter out empty nodes you can use .prune()
", with a link to the API docs.
for more information, see https://pre-commit.ci
…adinor/xarray into feature/datatree-prune-method
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.
Looks great, thank you!
whats-new.rst