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

Method test_duplicate_dims

xarray/tests/test_dask.py:671–678  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

669 assert count[0] == 1
670
671 def test_duplicate_dims(self):
672 data = np.random.normal(size=(4, 4))
673 with pytest.warns(UserWarning, match="Duplicate dimension"):
674 arr = DataArray(data, dims=("x", "x"))
675 with pytest.warns(UserWarning, match="Duplicate dimension"):
676 chunked_array = arr.chunk({"x": 2})
677 assert chunked_array.chunks == ((2, 2), (2, 2))
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))

Callers

nothing calls this directly

Calls 2

chunkMethod · 0.95
DataArrayClass · 0.90

Tested by

no test coverage detected