Skip to content

Commit

Permalink
zarr roundtripping strings to/from json
Browse files Browse the repository at this point in the history
  • Loading branch information
sneakers-the-rat committed Dec 14, 2024
1 parent e942da4 commit 616785e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/numpydantic/interface/zarr.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ def to_array_input(self) -> Union[ZarrArray, ZarrArrayPath]:
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


Expand Down

0 comments on commit 616785e

Please sign in to comment.