datatree.DataTree.equals#

DataTree.equals(other: datatree.datatree.DataTree, from_root: bool = True) bool[source][source]#

Two DataTrees are equal if they have isomorphic node structures, with matching node names, and if they have matching variables and coordinates, all of which are equal.

By default this method will check the whole tree above the given node.

Parameters
  • other (DataTree) – The other tree object to compare to.

  • from_root (bool, optional, default is True) – Whether or not to first traverse to the root of the two trees before checking for isomorphism. If neither tree has a parent then this has no effect.

See also

Dataset.equals, DataTree.isomorphic, DataTree.identical