zarr roundtripping strings to/from json

This commit is contained in:
sneakers-the-rat 2024-12-13 18:08:16 -08:00
parent e942da4bec
commit 616785e6ed
Signed by untrusted user who does not match committer: jonny
GPG key ID: 6DCB96EF1E4D232D

View file

@ -74,7 +74,8 @@ class ZarrJsonDict(JsonDict):
if self.file:
array = ZarrArrayPath(file=self.file, path=self.path)
else:
array = zarr.array(self.value, dtype=self.dtype)
dtype = np.str_ if self.dtype == "str" else self.dtype
array = zarr.array(self.value, dtype=dtype)
return array