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

Method test_matmul

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

Source from the content-addressed store, hash-verified

4430 assert_equal(expected2, actual2)
4431
4432 def test_matmul(self) -> None:
4433 # copied from above (could make a fixture)
4434 x = np.linspace(-3, 3, 6)
4435 y = np.linspace(-3, 3, 5)
4436 z = range(4)
4437 da_vals = np.arange(6 * 5 * 4).reshape((6, 5, 4))
4438 da = DataArray(da_vals, coords=[x, y, z], dims=["x", "y", "z"])
4439
4440 result = da @ da
4441 expected = da.dot(da)
4442 assert_identical(result, expected)
4443
4444 def test_matmul_align_coords(self) -> None:
4445 # GH 3694

Callers

nothing calls this directly

Calls 5

dotMethod · 0.95
DataArrayClass · 0.90
assert_identicalFunction · 0.90
linspaceMethod · 0.80
arangeMethod · 0.80

Tested by

no test coverage detected