File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 4141
4242
4343def get (
44- tree : DataTree , key : str , default : Optional [Scalar ] = None
45- ) -> Optional [Scalar ]:
44+ tree : DataTree , key : str , default : Optional [Any ] = None
45+ ) -> Optional [Any ]:
4646 """
4747 Get a value with the given `name` from the given `tree`
4848 node. Look first in its variables, then dims, then attrs.
@@ -66,8 +66,8 @@ def get(
6666def find (
6767 tree : DataTree ,
6868 key : str ,
69- default : Optional [Scalar ] = None ,
70- ) -> Optional [Scalar ]:
69+ default : Optional [Any ] = None ,
70+ ) -> Optional [Any ]:
7171 """
7272 Search for a value with the given `key` in the given `tree`, first
7373 within its own `Dataset`, then depth-first from the root downwards.
@@ -81,7 +81,7 @@ def _find_recursive(tree, key):
8181 value = get (tree , key , None )
8282 if value is not None :
8383 return value
84- # bfs over children
84+ # dfs over children
8585 for node in tree .children .values ():
8686 value = get (node , key , None )
8787 if value is not None :
You can’t perform that action at this time.
0 commit comments