-
-
Notifications
You must be signed in to change notification settings - Fork 371
Closed
Labels
V2Affects the v2 branchAffects the v2 branchbugPotential issues with the zarr-python libraryPotential issues with the zarr-python library
Description
This is a problem that showed up when testing the Zarr Julia interface. Currently nan-values in user-attribute values are not converted to strings (see example below), which does not adhere to JSON specs and causes the Julia JSON parser to fail. So I would suggest to do something analogous to the fill_value entry in .zarray, i.e. to either forbid nan in zarr user attributes or convert them to strings to make the resulting JSON valid.
import zarr
import numpy
z1 = zarr.open('attrtest')
z1.attrs['att1']=numpy.nan
with open('attrtest/.zattrs') as myfile:
print(myfile.read())Metadata
Metadata
Assignees
Labels
V2Affects the v2 branchAffects the v2 branchbugPotential issues with the zarr-python libraryPotential issues with the zarr-python library