Skip to content

AsyncGroup.create_dataset() might call AsyncGroup.create_array() without dtype argument #3050

@DimitriPapadopoulos

Description

@DimitriPapadopoulos

Zarr version

main branch

Description

AsyncGroup.create_array() arguments shape and dtype have no default value, so they are mandatory:

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:

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

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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy