MCPcopy Create free account
hub / github.com/dask/dask / test_slicing

Function test_slicing

dask/array/tests/test_xarray.py:169–176  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

167
168
169def test_slicing():
170 ds = xr.Dataset(
171 {"z": (("t", "p", "y", "x"), np.ones((1, 1, 31, 40)))},
172 )
173 ds = ds.chunk()
174 subset = ds.isel(t=[0], p=0).z[:, ::10, ::10][:, ::-1, :]
175 subset2 = ds.isel(t=[0]).isel(p=0).z[:, ::10, ::10][:, ::-1, :]
176 assert_eq(subset.data, subset2.data)
177
178
179@pytest.mark.filterwarnings("ignore:Passing an object to dask.array")

Callers

nothing calls this directly

Calls 3

assert_eqFunction · 0.90
onesMethod · 0.45
chunkMethod · 0.45

Tested by

no test coverage detected