33import json
44from asyncio import gather
55from dataclasses import dataclass , field , replace
6+ from itertools import starmap
67from logging import getLogger
78from typing import TYPE_CHECKING , Any , Generic , Literal , cast , overload
89
@@ -184,8 +185,6 @@ class AsyncArray(Generic[T_ArrayMetadata]):
184185 The metadata of the array.
185186 store_path : StorePath
186187 The path to the Zarr store.
187- codec_pipeline : CodecPipeline, optional
188- The codec pipeline used for encoding and decoding chunks, by default None.
189188 order : {'C', 'F'}, optional
190189 The order of the array data in memory, by default None.
191190
@@ -816,7 +815,7 @@ def cdata_shape(self) -> ChunkCoords:
816815 Tuple[int]
817816 The shape of the chunk grid for this array.
818817 """
819- return tuple (ceildiv ( s , c ) for s , c in zip (self .shape , self .chunks , strict = False ))
818+ return tuple (starmap ( ceildiv , zip (self .shape , self .chunks , strict = False ) ))
820819
821820 @property
822821 def nchunks (self ) -> int :
@@ -855,9 +854,9 @@ def _iter_chunk_coords(
855854
856855 Parameters
857856 ----------
858- origin: Sequence[int] | None, default=None
857+ origin : Sequence[int] | None, default=None
859858 The origin of the selection relative to the array's chunk grid.
860- selection_shape: Sequence[int] | None, default=None
859+ selection_shape : Sequence[int] | None, default=None
861860 The shape of the selection in chunk grid coordinates.
862861
863862 Yields
@@ -876,9 +875,9 @@ def _iter_chunk_keys(
876875
877876 Parameters
878877 ----------
879- origin: Sequence[int] | None, default=None
878+ origin : Sequence[int] | None, default=None
880879 The origin of the selection relative to the array's chunk grid.
881- selection_shape: Sequence[int] | None, default=None
880+ selection_shape : Sequence[int] | None, default=None
882881 The shape of the selection in chunk grid coordinates.
883882
884883 Yields
@@ -899,9 +898,9 @@ def _iter_chunk_regions(
899898
900899 Parameters
901900 ----------
902- origin: Sequence[int] | None, default=None
901+ origin : Sequence[int] | None, default=None
903902 The origin of the selection relative to the array's chunk grid.
904- selection_shape: Sequence[int] | None, default=None
903+ selection_shape : Sequence[int] | None, default=None
905904 The shape of the selection in chunk grid coordinates.
906905
907906 Yields
@@ -1149,17 +1148,7 @@ async def info(self) -> None:
11491148
11501149@dataclass (frozen = True )
11511150class Array :
1152- """Instantiate an array from an initialized store.
1153-
1154- Parameters
1155- ----------
1156- store : StoreLike
1157- The array store that has already been initialized.
1158- shape : ChunkCoords
1159- The shape of the array.
1160- dtype : npt.DTypeLike
1161- The dtype of the array.
1162- """
1151+ """Instantiate an array from an initialized store."""
11631152
11641153 _async_array : AsyncArray [ArrayV3Metadata ] | AsyncArray [ArrayV2Metadata ]
11651154
@@ -1395,7 +1384,7 @@ def cdata_shape(self) -> ChunkCoords:
13951384 """
13961385 The shape of the chunk grid for this array.
13971386 """
1398- return tuple (ceildiv ( s , c ) for s , c in zip (self .shape , self .chunks , strict = False ))
1387+ return tuple (starmap ( ceildiv , zip (self .shape , self .chunks , strict = False ) ))
13991388
14001389 @property
14011390 def nchunks (self ) -> int :
@@ -1417,9 +1406,9 @@ def _iter_chunk_coords(
14171406
14181407 Parameters
14191408 ----------
1420- origin: Sequence[int] | None, default=None
1409+ origin : Sequence[int] | None, default=None
14211410 The origin of the selection relative to the array's chunk grid.
1422- selection_shape: Sequence[int] | None, default=None
1411+ selection_shape : Sequence[int] | None, default=None
14231412 The shape of the selection in chunk grid coordinates.
14241413
14251414 Yields
@@ -1454,9 +1443,9 @@ def _iter_chunk_keys(
14541443
14551444 Parameters
14561445 ----------
1457- origin: Sequence[int] | None, default=None
1446+ origin : Sequence[int] | None, default=None
14581447 The origin of the selection relative to the array's chunk grid.
1459- selection_shape: Sequence[int] | None, default=None
1448+ selection_shape : Sequence[int] | None, default=None
14601449 The shape of the selection in chunk grid coordinates.
14611450
14621451 Yields
@@ -1476,9 +1465,9 @@ def _iter_chunk_regions(
14761465
14771466 Parameters
14781467 ----------
1479- origin: Sequence[int] | None, default=None
1468+ origin : Sequence[int] | None, default=None
14801469 The origin of the selection relative to the array's chunk grid.
1481- selection_shape: Sequence[int] | None, default=None
1470+ selection_shape : Sequence[int] | None, default=None
14821471 The shape of the selection in chunk grid coordinates.
14831472
14841473 Yields
@@ -2229,7 +2218,7 @@ def get_mask_selection(
22292218
22302219 Parameters
22312220 ----------
2232- selection : ndarray, bool
2221+ mask : ndarray, bool
22332222 A Boolean array of the same shape as the array against which the selection is
22342223 being made.
22352224 out : NDBuffer, optional
@@ -2312,7 +2301,7 @@ def set_mask_selection(
23122301
23132302 Parameters
23142303 ----------
2315- selection : ndarray, bool
2304+ mask : ndarray, bool
23162305 A Boolean array of the same shape as the array against which the selection is
23172306 being made.
23182307 value : npt.ArrayLike
0 commit comments