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

zarr.create(dtype=str) has different dtype in 3 (<U) vs 2 (O) #2315

Closed
rabernat opened this issue Oct 9, 2024 · 0 comments · Fixed by #2323
Closed

zarr.create(dtype=str) has different dtype in 3 (<U) vs 2 (O) #2315

rabernat opened this issue Oct 9, 2024 · 0 comments · Fixed by #2323
Labels
V3 Affects the v3 branch

Comments

@rabernat
Copy link
Contributor

rabernat commented Oct 9, 2024

For Zarr 2.18.3

zarr.create(shape=10, dtype=str).dtype
# -> dtype('O')

For v3 branch @ 5a134bf

zarr.create(shape=10, dtype=str, zarr_version=2).dtype
# -> dtype('<U')

This is causing problems in Xarray for string compatibility.

Might have been broken by #2036

cc @TomAugspurger

@rabernat rabernat added the V3 Affects the v3 branch label Oct 9, 2024
TomAugspurger added a commit to TomAugspurger/zarr-python that referenced this issue Oct 9, 2024
TomAugspurger added a commit to TomAugspurger/zarr-python that referenced this issue Oct 9, 2024
TomAugspurger added a commit that referenced this issue Oct 11, 2024
* Special case object dtype

Closes #2315

---------

Co-authored-by: Joe Hamman <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
V3 Affects the v3 branch
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant