Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Complex dtypes lost when writing V2 arrays #2711

Open
martindurant opened this issue Jan 14, 2025 · 4 comments
Open

Complex dtypes lost when writing V2 arrays #2711

martindurant opened this issue Jan 14, 2025 · 4 comments
Labels
bug Potential issues with the zarr-python library

Comments

@martindurant
Copy link
Member

Zarr version

3.0.1++

Numcodecs version

Python Version

3.12

Operating System

linux

Installation

manual from source

Description

Compound dtypes ("records") are allowed by numpy and worked in V2. They now loose their internal structure.

Steps to reproduce

The following passes on v2, not on v3

g = zarr.open(mode="w", zarr_version=2)
arr = g.create_array("name", dtype=[('a', "i8"), ('b', 'f8')], shape=(1, ), chunks=(1,), compressor=None, overwrite=True)
arr2 = g["name"]
assert arr2.dtype == [('a', '<i8'), ('b', '<f8')]

The v3 dtype comes back as dtype('V16').

Additional output

No response

@martindurant martindurant added the bug Potential issues with the zarr-python library label Jan 14, 2025
@d-v-b
Copy link
Contributor

d-v-b commented Jan 14, 2025

xref #2134

@d-v-b
Copy link
Contributor

d-v-b commented Jan 14, 2025

i think #2681 will fix this

@martindurant
Copy link
Member Author

Sorry, I should have checked for similar reports

@d-v-b
Copy link
Contributor

d-v-b commented Jan 14, 2025

no worries! the volume of issues related to any given problem is so far a good informal measure of severity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Potential issues with the zarr-python library
Projects
None yet
Development

No branches or pull requests

2 participants