-
-
Notifications
You must be signed in to change notification settings - Fork 348
Closed
Milestone
Description
In V2, the way you create an array with a Group is
import zarr
root = zarr.open_group('data/example.zarr', mode='w')
array = root.create("foo", shape=10)
https://zarr.readthedocs.io/en/stable/api/hierarchy.html#zarr.hierarchy.Group.create
V3 Groups also have a create
method; but it is a class method to create a new group
import zarr
root = zarr.Group.create(store)
# new syntax for creating an array
array = root.create_array("foo", ...)
# old syntax doesn't work...tries to create another group!
root.create('foo', shape=(10,))
# -> TypeError: Group.create() got an unexpected keyword argument 'shape'
I predict this is going to be a big source of confusion with V3. We should think about how to minimize the pain.
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Done