You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Don't infer a default fill_value for zarr_format=2? #2271
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)
changed the title [-]Don't infer a default `fill_value` for `zarr_format=2`[/-][+]Don't infer a default `fill_value` for `zarr_format=2`?[/+]on Sep 30, 2024
Activity
[-]Don't infer a default `fill_value` for `zarr_format=2`[/-][+]Don't infer a default `fill_value` for `zarr_format=2`?[/+]