-
-
Notifications
You must be signed in to change notification settings - Fork 346
Open
Labels
bugPotential issues with the zarr-python libraryPotential issues with the zarr-python library
Description
Zarr version
main branch
Description
AsyncGroup.create_array()
arguments shape
and dtype
have no default value, so they are mandatory:
zarr-python/src/zarr/core/group.py
Lines 994 to 1000 in 5ff3fbe
async def create_array( | |
self, | |
name: str, | |
*, | |
shape: ShapeLike, | |
dtype: npt.DTypeLike, | |
chunks: ChunkCoords | Literal["auto"] = "auto", |
As far as I can see, AsyncGroup.create_dataset()
may call AsyncGroup.create_array()
without dtype
argument if kwargs
is missing dtype
and data
is None
:
zarr-python/src/zarr/core/group.py
Lines 1158 to 1160 in 5ff3fbe
if "dtype" not in kwargs and data is not None: | |
kwargs["dtype"] = data.dtype | |
array = await self.create_array(name, shape=shape, **kwargs) |
Granted, that wouldn't make sense, but it would be better to handle that corner case nicely.
Metadata
Metadata
Assignees
Labels
bugPotential issues with the zarr-python libraryPotential issues with the zarr-python library