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
Not sure if this is already supported and I'm just running into some kind of problem or if this is yet to be implemented. That said, I would really like to be able to store string and byte arrays. This would be of particular value when working with some kinds of large pieces of metadata.
Do you mean creating a zarr array of strings? Or storing strings in the
attributes for an array or group?
If it's the former, then there are a couple of options. One is to create a
zarr array with S or U fixed size dtype. This should be supported
currently. Another option is to create a zarr array with object dtype,
which can handle variable length strings. To make that work you need to add
a filter that knows how to encode/decode Python objects. There are two
filters in numcodecs that can do this, one using pickle, the other using
msgpack. Once I have numcodecs and zarr integrated, these should both be
available.
There have also been discussions of creating a codec for variable length
strings that is cross-platform, don't have web to hand but there are some
issues to xref.
Activity
jakirkham commentedon Feb 27, 2017
FWIW I encountered some issue where JSON serializability came into question.
Edit: This was when in use with
attrs. Though I have use cases for bothattrsand arrays with string/byte data.alimanfoo commentedon Feb 27, 2017