zarr.js icon indicating copy to clipboard operation
zarr.js copied to clipboard

Support for string arrays with categorize

Open andreasg123 opened this issue 4 years ago • 1 comments

It would be great if you could add support for string arrays that have been categorized with numcodecs.Categorize: https://zarr.readthedocs.io/en/stable/tutorial.html#string-arrays

In .zarray, they are represented like this:

"filters":[{"astype":"|u1","dtype":"|O","id":"categorize","labels":["abc","bcd","cde","def"]}]

A workaround would be to store an integer array in the Zarr hierarchy. The mappings would need to be put in a JSON file that is not part of the Zarr specification.

Is this something on your roadmap?

andreasg123 avatar Feb 20 '21 23:02 andreasg123

Is there an update on this issue? I second the request to add support for string arrays.

GibbonJojo avatar Apr 04 '23 08:04 GibbonJojo