Skip to content

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

Open
@dstansby

Description

@dstansby
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?

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