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

Function test_zarr_existing_array

dask/array/tests/test_array_core.py:5038–5046  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5036
5037
5038def test_zarr_existing_array():
5039 zarr = pytest.importorskip("zarr")
5040 c = (1, 1)
5041 a = da.ones((3, 3), chunks=c)
5042 z = zarr.zeros_like(a, chunks=c)
5043 a.to_zarr(z)
5044 a2 = da.from_zarr(z)
5045 assert_eq(a, a2)
5046 assert a2.chunks == a.chunks
5047
5048
5049def test_to_zarr_unknown_chunks_raises():

Callers

nothing calls this directly

Calls 3

assert_eqFunction · 0.90
to_zarrMethod · 0.80
onesMethod · 0.45

Tested by

no test coverage detected