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

Method test_broadcast_equals

xarray/tests/test_dataarray.py:642–652  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

640 assert not orig.broadcast_equals({1: 2}) # type: ignore[arg-type]
641
642 def test_broadcast_equals(self) -> None:
643 a = DataArray([0, 0], {"y": 0}, dims="x")
644 b = DataArray([0, 0], {"y": ("x", [0, 0])}, dims="x")
645 assert a.broadcast_equals(b)
646 assert b.broadcast_equals(a)
647 assert not a.equals(b)
648 assert not a.identical(b)
649
650 c = DataArray([0], coords={"x": 0}, dims="y")
651 assert not a.broadcast_equals(c)
652 assert not c.broadcast_equals(a)
653
654 def test_getitem(self) -> None:
655 # strings pull out dataarrays

Callers

nothing calls this directly

Calls 4

broadcast_equalsMethod · 0.95
equalsMethod · 0.95
identicalMethod · 0.95
DataArrayClass · 0.90

Tested by

no test coverage detected