MCPcopy Index your code
hub / github.com/pydata/xarray / same_tree

Method same_tree

xarray/core/treenode.py:658–660  ·  view source on GitHub ↗

True if other node is in the same tree as this node.

(self, other: Self)

Source from the content-addressed store, hash-verified

656 raise KeyError(key)
657
658 def same_tree(self, other: Self) -> bool:
659 """True if other node is in the same tree as this node."""
660 return self.root is other.root
661
662
663AnyNamedNode = TypeVar("AnyNamedNode", bound="NamedNode")

Callers 3

relative_toMethod · 0.80
_path_to_ancestorMethod · 0.80
test_same_treeMethod · 0.80

Calls

no outgoing calls

Tested by 1

test_same_treeMethod · 0.64