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:4998–5006  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4996
4997
4998def test_zarr_existing_array():
4999 zarr = pytest.importorskip("zarr")
5000 c = (1, 1)
5001 a = da.ones((3, 3), chunks=c)
5002 z = zarr.zeros_like(a, chunks=c)
5003 a.to_zarr(z)
5004 a2 = da.from_zarr(z)
5005 assert_eq(a, a2)
5006 assert a2.chunks == a.chunks
5007
5008
5009def 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