zarr-python icon indicating copy to clipboard operation
zarr-python copied to clipboard

ensure that fill_value matches dtype

Open d-v-b opened this issue 7 months ago • 0 comments

  • ensures that the fill_value of a v3 array is an instance of that array's dtype. The behavior here matches numpy type casting rules, so if dtype is bool and the fill_value is provided as 1, the resulting fill_value metadata will be True. I'm happy to change this behavior, but for now this is expedient and matches what people might expect from v2 and numpy
  • refactors the metadata classes by partitioning v2 and v3 metadata into src/zarr/metadata/v2.py and src/zarr/metadata/v2.py, respectively

TODO:

  • [ ] Add unit tests and/or doctests in docstrings
  • [ ] Add docstrings and API docs for any new/modified user-facing classes and functions
  • [ ] New/modified features documented in docs/tutorial.rst
  • [ ] Changes documented in docs/release.rst
  • [ ] GitHub Actions have all passed
  • [ ] Test coverage is 100% (Codecov passes)

d-v-b avatar Jul 04 '24 20:07 d-v-b