Skip to content

Incorrect warning when creating zarr_format=2 array with order keyword #2948

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

Open
dstansby opened this issue Apr 3, 2025 · 0 comments
Open
Labels
bug Potential issues with the zarr-python library

Comments

@dstansby
Copy link
Contributor

dstansby commented Apr 3, 2025

import zarr
import zarr.storage

zarr.create(
    (100,),
    store=zarr.storage.MemoryStore(),
    order="F",
    zarr_format=2,
)

warns

/Users/dstansby/software/zarr/pydantic-zarr/.venv/lib/python3.12/site-packages/zarr/api/asynchronous.py:1015: RuntimeWarning: The `order` keyword argument has no effect for Zarr format 3 arrays. To control the memory layout of the array, either use the `config` keyword argument, as in `config={'order: 'C'}`,or change the global 'array.order' configuration variable.
  _warn_order_kwarg()

But I'm creating a zarr format 2 array, so I don't think this should warn?

@dstansby dstansby added the bug Potential issues with the zarr-python library label Apr 3, 2025
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

1 participant