spatialdata icon indicating copy to clipboard operation
spatialdata copied to clipboard

sdata does not save when chunks are not equal

Open lotte-vandevreken opened this issue 1 year ago • 1 comments

When trying to save the sdata to .zarr, it gives an error when the chunks are not equal (for example after cropping the sdata with the bounding_box_query function). The error was fixed after running sdata[image].data = sdata[image].data.rechunk() and sdata[label].data = sdata[label].data.rechunk() for all images and labels.

Maybe this could be added as an extra option to the sdata.write function?

cc. @giovp @lopollar

lotte-vandevreken avatar Jun 12 '24 11:06 lotte-vandevreken

I think this could be an issue with the parser

giovp avatar Sep 08 '24 00:09 giovp

I think that this has been addressed by @giovp's PR here https://github.com/scverse/spatialdata/commit/8239455d8abb240dac562dc55511a2bc89822aa4#diff-68732a380479ee7f6980e3662cfbb8eb7bf2713cf5166f6546309a93226869d5R162 with the calls to .chunk('auto').

@lotte-vandevreken could you please verify if the issue is now solved? Thanks 😊

LucaMarconato avatar Oct 03 '24 16:10 LucaMarconato

@LucaMarconato the issue is solved! Thanks!

lotte-vandevreken avatar Oct 04 '24 15:10 lotte-vandevreken