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 cae7055 commit 1aeb49aCopy full SHA for 1aeb49a
src/zarr/core/metadata/v3.py
@@ -427,6 +427,7 @@ def parse_fill_value(
427
428
# the rest are numeric types
429
np_dtype = data_type.to_numpy()
430
+ np_dtype = cast(np.dtype[np.generic], np_dtype)
431
432
if isinstance(fill_value, Sequence) and not isinstance(fill_value, str):
433
if data_type in (DataType.complex64, DataType.complex128):
@@ -479,7 +480,9 @@ def default_fill_value(dtype: DataType) -> str | bytes | np.generic:
479
480
elif dtype == DataType.bytes:
481
return b""
482
else:
- return dtype.to_numpy().type(0)
483
+ np_dtype = dtype.to_numpy()
484
485
+ return np_dtype.type(0)
486
487
488
# For type checking
0 commit comments