-
-
Notifications
You must be signed in to change notification settings - Fork 346
Write chunks with negative zero values and a zero fill value #3216
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
base: main
Are you sure you want to change the base?
Conversation
d4c1205
to
2745b68
Compare
2745b68
to
7d6d74b
Compare
Oh, oops, thanks 😅 |
7d6d74b
to
c4904e3
Compare
this test failure seems significant: https://github.com/zarr-developers/zarr-python/actions/runs/16172926021/job/45650861381?pr=3216#step:8:420 |
Yes looks like this approach doesn't work for complex number types |
what if we view the array as raw bytes (should be cheap) and compare the raw bytes? >>> import numpy as np
>>> np.array([0.0]) == np.array([-0.0])
array([ True])
>>> np.array([0.0]).view('V') == np.array([-0.0]).view('V')
array([False]) |
I wonder if that would somehow break with floating point subnormal-s and the like. Will have to experiment 🤔 |
Fixes #3144.
Using
np.any(self._data)
was inspired by how Zarr v2 checks for equality with a falsey fill value.TODO:
docs/user-guide/*.rst
changes/