-
-
Notifications
You must be signed in to change notification settings - Fork 371
Open
Labels
enhancementNew features or improvementsNew features or improvements
Description
We are working on the zarr backend for XArray (pydata/xarray#1528). XArray likes to put all kinds of weird stuff into attributes, including numpy datatypes and even numpy arrays. This is because the netCDF data model allows attributes to have all of the same types as variables.
Instead, in zarr, the attributes have to be json-serializable. So this doesn't work:
za = zarr.create(shape=(1), store='tmp_file')
za.attrs['foo'] = np.float32(0)It raises TypeError: Object of type 'float32' is not JSON serializable.
We will need some sort of workaround for this in order to make zarr work as a store for xarray.
Metadata
Metadata
Assignees
Labels
enhancementNew features or improvementsNew features or improvements