-
-
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
Consider renaming DataTree.map_over_subtree (or revising its API) #9573
Comments
👍
"Subtree" as a term basically means "this node and all descendants of this node", and is almost redundant with
Providing access to the
|
In one of the meetings we proposed renaming |
This was closed by #9622. If we want to add a new function that actually does map over |
What is your issue?
We have a bit of a naming inconsistency in DataTree:
subtrees
property is an iterator over all sub-tree nodes as a DataTree objectsmap_over_subtree
maps a function over all sub-tree nodes as Dataset objectsI think it makes sense for "subtree" to refer strictly to DataTree objects. In that case, perhaps we should rename
map_over_subtree
tomap_over_datasets
?Alternatively, could also change the interface to iterate over DataTree objects instead, which are easy to convert into datasets (via
.dataset
) and additionally provide the full context of a node'spath
and parents.The text was updated successfully, but these errors were encountered: