File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -3458,7 +3458,7 @@ async def create_array(
34583458 store : str | StoreLike ,
34593459 * ,
34603460 path : PathLike | None = None ,
3461- shape : ChunkCoords ,
3461+ shape : ShapeLike ,
34623462 dtype : npt .DTypeLike ,
34633463 chunk_shape : ChunkCoords ,
34643464 shard_shape : ChunkCoords | None = None ,
@@ -3543,6 +3543,7 @@ async def create_array(
35433543 sub_codecs = (* filters , BytesCodec (), * compressors )
35443544 _dtype_parsed = parse_dtype (dtype , zarr_format = zarr_format )
35453545 config_parsed = parse_array_config (config )
3546+ shape_parsed = parse_shapelike (shape )
35463547 result : AsyncArray [ArrayV3Metadata ] | AsyncArray [ArrayV2Metadata ]
35473548 if zarr_format == 2 :
35483549 if shard_shape is not None :
@@ -3566,7 +3567,7 @@ async def create_array(
35663567 order_parsed = order
35673568 result = await AsyncArray ._create_v2 (
35683569 store_path = store_path ,
3569- shape = shape ,
3570+ shape = shape_parsed ,
35703571 dtype = _dtype_parsed ,
35713572 chunks = chunk_shape ,
35723573 dimension_separator = "/" ,
@@ -3597,7 +3598,7 @@ async def create_array(
35973598
35983599 result = await AsyncArray ._create_v3 (
35993600 store_path = store_path ,
3600- shape = shape ,
3601+ shape = shape_parsed ,
36013602 dtype = _dtype_parsed ,
36023603 fill_value = fill_value ,
36033604 attributes = attributes ,
Original file line number Diff line number Diff line change 4646if TYPE_CHECKING :
4747 from collections .abc import AsyncGenerator , Generator , Iterable , Iterator
4848 from typing import Any
49- from zarr . core . common import MemoryOrder
49+
5050 from zarr .abc .codec import Codec
5151 from zarr .core .buffer import Buffer , BufferPrototype
5252 from zarr .core .chunk_key_encodings import ChunkKeyEncoding
53+ from zarr .core .common import MemoryOrder
5354
5455logger = logging .getLogger ("zarr.group" )
5556
You can’t perform that action at this time.
0 commit comments