Helper function for equals, broadcast_equals, and identical
(self, other: Self, compat_str: str)
| 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 |
no test coverage detected