Skip to content

V3 array creation dtype parameter #1927

@rabernat

Description

@rabernat

In V2, an array can be created with no dtype. The default dtype is f8: https://zarr.readthedocs.io/en/stable/api/creation.html#zarr.creation.create

In V3, dtype is mandatory.

import zarr
arr = zarr.Array.create(store=zarr.store.MemoryStore(), shape=(10,), chunks=(5,))
# -> TypeError: Array.create() missing 1 required keyword-only argument: 'dtype'

I think we should consider bringing back the default for backwards compatibility.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions