Skip to content

Using ArrayV3Metadata, kerchunk fill_value will always be coerced to a value, even though null is a valid fill_value for Zarr V2 #478

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
abarciauskas-bgse opened this issue Mar 6, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@abarciauskas-bgse
Copy link
Collaborator

abarciauskas-bgse commented Mar 6, 2025

This issue follows when #453 is merged
🚧 If the fill_value passed to ArrayV3Metadata is None, ArrayV3Metadata will automatically coerce the fill_value to the default of the data type. For example, fill_value will be 0 if None is passed. This means that writing back to v2 metadata will generate a fill_value of the default for the data type, rather than set it as null, which is valid for Zarr V2. See also pydata/xarray#5475 (comment)

Originally posted by @abarciauskas-bgse in #429 (comment)

@abarciauskas-bgse abarciauskas-bgse changed the title 🚧 [If the fill_value passed to ArrayV3Metadata is None, ArrayV3Metadata will automatically coerce the fill_value to the default of the data type](https://github.com/zarr-developers/zarr-python/blob/v3.0.2/src/zarr/core/metadata/v3.py#L271-L272). For example, fill_value will be 0 if None is passed. This means that writing back to v2 metadata will generate a fill_value of the default for the data type, rather than set it as null, which is valid for Zarr V2. See also https://github.com/pydata/xarray/issues/5475#issuecomment-2383046633 Using ArrayV3Metadata, kerchunk fill_value will always be coerced to a value, even though null is a valid fill_value for Zarr V2 Mar 6, 2025
@TomNicholas TomNicholas added the bug Something isn't working label Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants