You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just hopping into this dicusssion, but this does limit the ability for Hyperspy to support zarr 3.0.0. Our usecase is for ragged arrays which should be supported, and don't have the same security issues that directly json encoding a python object.
We could just unwrap the ragged arrays and store them alongside an second array with information of how to recreate the ragged array. Is that the best way to handle this or is there a better way to encode varible length objects.
@d-v-b Thanks for the response! There is the VLenBytesCodec which seems like it could handle most of the encoding as long as the underlying array is 1 dimensional? The underlying source says that this might be changed in the future and is not explicitly supporting in v3. Is that still correct?
In rabernat#1 we are developing an experimental prototype allowing any Arrow datatype to be stored in Zarr. This would enable ragged arrays using arrow list types.
Just a follow on comment that for my application (https://github.com/JamiePringle/EZfate) in which we store the connectivity patterns between different parts of the coastal ocean, the ragged array type is very important. I look forward to seeing it come to v3! Jamie
We are still missing a specification of a data type. IMO it should probably be a generic vlen data type, which will subsume the existing variable-length bytes and variable-length string data types.
Would it make more sense to store a sparse array instead? Not that Zarr has a good sparse story yet, but there are existing storage patterns for sparse array that could be adapted to Zarr
Deepak --alas, no, it would be awkward. This is not a simple sparse connectivity matrix. I have a variable number of paths from location i to location j. I calculate things like the time to get from i to j, and the mean temperature experienced, etc. And all of these values are different for each individual path from i to j. So I can't do a simple E[i,j]=(one number)
Also, for my sins, I need to convert these data structures to R, so biologists can use them easily. The standard R data structure, the DataFrame, can handle ragged arrays.
Activity
CSSFrancis commentedon Jan 10, 2025
Just hopping into this dicusssion, but this does limit the ability for Hyperspy to support zarr 3.0.0. Our usecase is for ragged arrays which should be supported, and don't have the same security issues that directly json encoding a python object.
We could just unwrap the ragged arrays and store them alongside an second array with information of how to recreate the ragged array. Is that the best way to handle this or is there a better way to encode varible length objects.
d-v-b commentedon Jan 10, 2025
I think ragged arrays are definitely in-scope for 3.x, we just haven't had time to implement it.
CSSFrancis commentedon Jan 10, 2025
@d-v-b Thanks for the response! There is the VLenBytesCodec which seems like it could handle most of the encoding as long as the underlying array is 1 dimensional? The underlying source says that this might be changed in the future and is not explicitly supporting in v3. Is that still correct?
sehoffmann commentedon Nov 17, 2025
Any updates on this?
rabernat commentedon Nov 17, 2025
In rabernat#1 we are developing an experimental prototype allowing any Arrow datatype to be stored in Zarr. This would enable ragged arrays using arrow list types.
JamiePringle commentedon Apr 9, 2026
Just a follow on comment that for my application (https://github.com/JamiePringle/EZfate) in which we store the connectivity patterns between different parts of the coastal ocean, the ragged array type is very important. I look forward to seeing it come to v3! Jamie
d-v-b commentedon Apr 9, 2026
We are still missing a specification of a data type. IMO it should probably be a generic
vlendata type, which will subsume the existing variable-length bytes and variable-length string data types.dcherian commentedon Apr 9, 2026
Jamie!
Would it make more sense to store a sparse array instead? Not that Zarr has a good sparse story yet, but there are existing storage patterns for sparse array that could be adapted to Zarr
JamiePringle commentedon Apr 9, 2026
Deepak --alas, no, it would be awkward. This is not a simple sparse connectivity matrix. I have a variable number of paths from location i to location j. I calculate things like the time to get from i to j, and the mean temperature experienced, etc. And all of these values are different for each individual path from i to j. So I can't do a simple E[i,j]=(one number)
Also, for my sins, I need to convert these data structures to R, so biologists can use them easily. The standard R data structure, the DataFrame, can handle ragged arrays.
hope all is well!