(self)
| 678 | assert chunked_array.chunksizes == {"x": (2, 2)} |
| 679 | |
| 680 | def test_stack(self): |
| 681 | data = da.random.normal(size=(2, 3, 4), chunks=(1, 3, 4)) |
| 682 | arr = DataArray(data, dims=("w", "x", "y")) |
| 683 | stacked = arr.stack(z=("x", "y")) |
| 684 | z = pd.MultiIndex.from_product( |
| 685 | [list(range(3)), list(range(4))], names=["x", "y"] |
| 686 | ) |
| 687 | expected = DataArray(data.reshape(2, -1), {"z": z}, dims=["w", "z"]) |
| 688 | assert stacked.data.chunks == expected.data.chunks |
| 689 | self.assertLazyAndEqual(expected, stacked) |
| 690 | |
| 691 | def test_dot(self): |
| 692 | eager = self.eager_array.dot(self.eager_array[0]) |
nothing calls this directly
no test coverage detected