Closed
Description
Zarr version
v3
Numcodecs version
na
Python Version
na
Operating System
na
Installation
na
Description
Zarr v2 didn't require a fill value to be set when writing data. To make it easier for users to transition to zarr-python v3 (ref pydata/xarray#5475), what do people think about changing the default fill_value
for array metadata? ArrayV2Metadata.fill_value
would be allowed to be None in memory and on disk.
We'd still have a fill value implicitly defined using the v2 rules for whatever fill value is actually used at read time.
Steps to reproduce
In [1]: import zarr
In [2]: arr = zarr.open_array(store = zarr.store.MemoryStore(store_dict={}, mode="w"), shape=(4,), zarr_format=2, fill_value=None) # arr.metadata.fill_value will be None
In [3]: arr[:] # at read time, find the v2 default and use that.
Out[3]: array([0.0, 0.0, 0.0, 0.0)
Additional output
No response