Skip to content

Issues with migration to zarr 3 #2689

@constantinpape

Description

@constantinpape

Hi zarr developers,
I have started with the migration to zarr 3, but ran into issues with the changes related to create_dataset / create_array:

  1. The functions don't support passing data as an argument directly anymore. So instead of
create_dataset("some_name", data=data)

it now requires

ds = create_dataset("some_name", shape=data.shape, dtype=data.dtype)
ds[:] = data

I use this regularly in existing code, and also include it in many examples since it is quite convenient and also support by h5py (see also next point).

  1. create_dataset raises a deprecation warning that it will be removed with version 3.1. Why did you make this decision? For me (and I assume others), compatibility with h5py is quite important to enable seamless switching between the file formats for their respective advantages. Without it I will not be able to use zarr-python (or rather would need to write an additional wrapper class around it, which I would like to avoid).

The same considerations apply to require_dataset / require_array.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions