(self)
| 4442 | assert_identical(result, expected) |
| 4443 | |
| 4444 | def test_matmul_align_coords(self) -> None: |
| 4445 | # GH 3694 |
| 4446 | |
| 4447 | x_a = np.arange(6) |
| 4448 | x_b = np.arange(2, 8) |
| 4449 | da_vals = np.arange(6) |
| 4450 | da_a = DataArray(da_vals, coords=[x_a], dims=["x"]) |
| 4451 | da_b = DataArray(da_vals, coords=[x_b], dims=["x"]) |
| 4452 | |
| 4453 | # only test arithmetic_join="inner" (=default) |
| 4454 | result = da_a @ da_b |
| 4455 | expected = da_a.dot(da_b) |
| 4456 | assert_identical(result, expected) |
| 4457 | |
| 4458 | with xr.set_options(arithmetic_join="exact"): |
| 4459 | with pytest.raises( |
| 4460 | ValueError, match=r"cannot align.*join.*exact.*not equal.*" |
| 4461 | ): |
| 4462 | da_a @ da_b |
| 4463 | |
| 4464 | def test_binary_op_propagate_indexes(self) -> None: |
| 4465 | # regression test for GH2227 |
nothing calls this directly
no test coverage detected