You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug with comparing ManifestArrays using __eq__ which have fill_value=NaN #501
I'm stuck on why this assert_identical on the datasets doesn't pass. It complains that all the coordinates are different, but every attribute I can think to check looks identical 😖
I found out what the problem is - two ManifestArrays with identical .metadata will compare not equal if they both have NaN for a fill_value. This is because the __eq__ check introspects deeper until it finds e.g. the np.float32(nan) type, but
In [4]: bool(np.float32('nan') ==np.float32('nan'))
Out[4]: False
The solution needs to be to actually check two Metadata classes are __eq__ with dedicated code, not just trusting the python dataclasses' automatically-generated __eq__ method to fi it.
I would ideally like to move that fix upstream into zarr-python.
Activity