-
-
Notifications
You must be signed in to change notification settings - Fork 390
Open
Labels
bugPotential issues with the zarr-python libraryPotential issues with the zarr-python library
Description
Zarr version
3.15
Numcodecs version
0.14.1
Python Version
3.13
Operating System
Windows
Installation
using poetry into virtual environment
Description
On Windows, the following snippet, which worked with zarr 2, fails with zarr 3 with
ValueError: No Zarr data type found that matches dtype 'dtype('uint32')'
Repro:
import zarr
a = np.array([1, 2], dtype=np.uint32) & 1
zarr.array(a)The issue seems to be that the dtype is UIntDtype instead of UInt32Dtype.
When running the following snippet:
dtypes = [
(np.array([1, 2], dtype=np.uint16) & 1).dtype,
(np.array([1, 2], dtype=np.uint32) & 1).dtype,
(np.array([1, 2], dtype=np.uint64) & 1).dtype,
]
for dtype in dtypes:
print(f"{dtype} {type(dtype)}")we get
uint16 <class 'numpy.dtypes.UInt16DType'>
uint32 <class 'numpy.dtypes.UIntDtype'>
uint64 <class 'numpy.dtypes.UInt64DType'>
Steps to reproduce
import zarr
a = np.array([1, 2], dtype=np.uint32) & 1
zarr.array(a)Additional output
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugPotential issues with the zarr-python libraryPotential issues with the zarr-python library