Uh oh!
There was an error while loading. Please reload this page.
fix: restore fill_value=None for zarr_format=2 - #3198
Conversation
Introduce a new Singleton sentinel class to indicate that the default scalar for the dtype should be used as the fill_value. This allows for preserving the zarr_format 2 behavior of None -> null. For zarr format 3 either the DefaulFillValue or None imply using the dtype default scalar value.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| dtype: ZDTypeLike | None = None, | ||
| compressor: CompressorLike = "auto", | ||
| fill_value: Any | None = None, # TODO: need type | ||
| fill_value: Any | None = DEFAULT_FILL_VALUE, # TODO: need type |
There was a problem hiding this comment.
for posterity, we now have a type alias for the scalar types of all the dtypes which we can use instead of Any here
There was a problem hiding this comment.
although maybe we should just use object, since we do want to allow inputs to be castable
d-v-b
left a comment
There was a problem hiding this comment.
thanks for this ian! In the interest of velocity I pushed some changes. I'm going to merge this as soon as all the checks pass.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@## main #3198 +/- ##
=======================================
Coverage 94.48% 94.48% =======================================
Files 78 78 Lines 8606 8609 +3 =======================================
+ Hits 8131 8134 +3
Misses 475 475
🚀 New features to boost your workflow:
|
Should fix#3197
Without this it is not possible to write "null" to the zarr format 2 fill value.
@d-v-b
As discussed in #3197 adds a new sentinel class to indicate using the default fill value for the dtype. Which gives:
nullnullfor a fill value input of
NoneTest comign once I get them to run locally (figuring out hatch)
TODO:
Add unit tests and/or doctests in docstrings
[NA] New/modified features documented in
docs/user-guide/*.rst[NA] Changes documented as a new file in
changes/GitHub Actions have all passed
Test coverage is 100% (Codecov passes)