We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ae4e573 commit 8fc5bdeCopy full SHA for 8fc5bde
src/zarr/core/metadata/v3.py
@@ -481,9 +481,9 @@ def parse_fill_value(
481
except (ValueError, OverflowError, TypeError) as e:
482
raise ValueError(f"fill value {fill_value!r} is not valid for dtype {data_type}") from e
483
# Check if the value is still representable by the dtype
484
- if fill_value == "NaN" and np.isnan(casted_value):
485
- pass
486
- elif fill_value in ["Infinity", "-Infinity"] and not np.isfinite(casted_value):
+ if (fill_value == "NaN" and np.isnan(casted_value)) or (
+ fill_value in ["Infinity", "-Infinity"] and not np.isfinite(casted_value)
+ ):
487
pass
488
elif np_dtype.kind == "f":
489
# float comparison is not exact, especially when dtype <float64
0 commit comments