-
Notifications
You must be signed in to change notification settings - Fork 66
After #516 zarr triggers a validation error for certain chunks formats #560
Copy link
Copy link
Open
Description
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)
ome-zarr-py/ome_zarr/writer.py
Line 740 in dcaf134
| zarr_array_kwargs["chunks"] = chunks_opt |
Until 0.13.0, chunk was only used in .rechunk
ome-zarr-py/ome_zarr/writer.py
Line 706 in 585daee
| image = da.array(image).rechunk(chunks=chunks_opt) |
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels