Skip to content

ValueError: No Zarr data type found that matches dtype 'dtype('uint32')' on Windows #3796

Closed

Description

@radoering

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

Activity

  1. added
    bugPotential issues with the zarr-python library
    on Mar 20, 2026
  2. d-v-b commented on Mar 20, 2026

    @d-v-b
    Contributor

    thanks for this report! The fix is probably to robustly figure out which numpy int data type is actually a 32 bit integer.

  3. added a commit that references this issue on Mar 21, 2026
    6a68741
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugPotential issues with the zarr-python library

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions