Reporting an issue that was reported in spatialdata here: scverse/spatialdata#1090.
In short, this PR https://github.com/ome/ome-zarr-py/pull/516/changes#diff-d51ad4cb28d657d5e09c58f40674b95273611983353ab5d7bb2049bbc6303f7b introduces this line of code (appearing first in 0.14.0)
|
zarr_array_kwargs["chunks"] = chunks_opt |
Until 0.13.0, chunk was only used in .rechunk
|
image = da.array(image).rechunk(chunks=chunks_opt) |
and therefore
chunks that are valid for
dask, such as
((3,), (512,), (512,)), would have been correctly handled. Now that
chunks is passed all the way down to
zarr, we get a validation error for values of
chunks that are not flat (in the case above,
zarr expects
(3, 512, 512), not the tuple of tuples format).
Since in spatialdata we have control of which format for chunks we pass to ome-zarr-py, I will implement a fix there. I nevertheless report as this problem may affect other developers.
Reporting an issue that was reported in
spatialdatahere: scverse/spatialdata#1090.In short, this PR https://github.com/ome/ome-zarr-py/pull/516/changes#diff-d51ad4cb28d657d5e09c58f40674b95273611983353ab5d7bb2049bbc6303f7b introduces this line of code (appearing first in 0.14.0)
ome-zarr-py/ome_zarr/writer.py
Line 740 in dcaf134
Until 0.13.0,
chunkwas only used in.rechunkome-zarr-py/ome_zarr/writer.py
Line 706 in 585daee
chunksthat are valid fordask, such as((3,), (512,), (512,)), would have been correctly handled. Now thatchunksis passed all the way down tozarr, we get a validation error for values ofchunksthat are not flat (in the case above,zarrexpects(3, 512, 512), not the tuple of tuples format).Since in
spatialdatawe have control of which format forchunkswe pass toome-zarr-py, I will implement a fix there. I nevertheless report as this problem may affect other developers.