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

Method _all_compat

xarray/core/dataarray.py:4690–4705  ·  view source on GitHub ↗

Helper function for equals, broadcast_equals, and identical

(self, other: Self, compat_str: str)

Source from the content-addressed store, hash-verified

4688 return from_iris(cube)
4689
4690 def _all_compat(self, other: Self, compat_str: str) -> bool:
4691 """Helper function for equals, broadcast_equals, and identical"""
4692
4693 # For identical, also compare indexes
4694 if compat_str == "identical":
4695 from xarray.core.indexes import indexes_identical
4696
4697 if not indexes_identical(self.xindexes, other.xindexes):
4698 return False
4699
4700 def compat(x, y):
4701 return getattr(x.variable, compat_str)(y.variable)
4702
4703 return utils.dict_equiv(self.coords, other.coords, compat=compat) and compat(
4704 self, other
4705 )
4706
4707 def broadcast_equals(self, other: Self) -> bool:
4708 """Two DataArrays are broadcast equal if they are equal after

Callers 3

broadcast_equalsMethod · 0.95
equalsMethod · 0.95
identicalMethod · 0.95

Calls 1

indexes_identicalFunction · 0.90

Tested by

no test coverage detected