Skip to content

fix: ensure fill_value for zarr v3 arrays round-trips - #11345

Merged
dcherian merged 2 commits into
pydata:mainfrom
d-v-b:encode-zarr-fill-value
May 20, 2026
Merged

fix: ensure fill_value for zarr v3 arrays round-trips#11345
dcherian merged 2 commits into
pydata:mainfrom
d-v-b:encode-zarr-fill-value

Conversation

@d-v-b

@d-v-b d-v-b commented May 20, 2026

Copy link
Copy Markdown
Contributor

Description

Fixes the second bug reported in #10269 by ensuring that fill_value is included in the encoding of the array when reading zarr v3 array data.

Some broader changes are necessary to ensure that this kind of bug (encoding at write time not matching the encoding at read time) don't happen. Might put those in a follow-up PR.

Checklist

  • Closes #xxxx
  • Tests added
  • User visible changes (including notable bug fixes) are documented in whats-new.rst
  • New functions/methods are listed in api.rst

AI Disclosure

  • This PR contains AI-generated content.
    • I have tested any AI-generated content in my PR.
    • I take responsibility for any AI-generated content in my PR. Tools: claude

@github-actions github-actions Bot added topic-backends topic-zarr Related to zarr storage library io labels May 20, 2026
@d-v-b

d-v-b commented May 20, 2026

Copy link
Copy Markdown
Contributor Author

mypy is failing because create_dataset is missing from Group. create_dataset was recently removed after over a year of deprecation. I will silence that mypy failure in this PR.

@d-v-b

d-v-b commented May 20, 2026

Copy link
Copy Markdown
Contributor Author

mypy is failing because create_dataset is missing from Group. create_dataset was recently removed after over a year of deprecation. I will silence that mypy failure in this PR.

nevermind, tests are red on main, and the mypy failure is in a file this PR didn't touch. I'll wait for a maintainer to weigh in.

@dcherian
dcherian merged commit d022da5 into pydata:main May 20, 2026
33 of 43 checks passed
@d-v-b
d-v-b deleted the encode-zarr-fill-value branch May 20, 2026 19:40
maxrjones pushed a commit to maxrjones/xarray that referenced this pull request May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

io topic-backends topic-zarr Related to zarr storage library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants