@@ -1048,7 +1048,7 @@ def __setitem__(self, key, value):
10481048 super ().__setitem__ (key , value )
10491049
10501050
1051- def detect_aligned_chunks ( # noqa: C901
1051+ def detect_aligned_chunks (
10521052 key : Sequence [slice ], shape : Sequence [int ], chunks : Sequence [int ], consecutive : bool = False
10531053) -> list [int ]:
10541054 """
@@ -1774,7 +1774,7 @@ def __getitem__( # noqa: C901
17741774 # Create the array to store the result
17751775 arr = np .empty (shape , dtype = self .dtype )
17761776 nparr = super ().get_slice_numpy (arr , (start , stop ))
1777- if step != (1 ,) * self .ndim :
1777+ if step != (1 ,) * self .ndim : # TODO: optimise to work like __setitem__ for non-unit steps
17781778 # have to make step refer to sliced dims (which will be less if ints present)
17791779 slice_ = tuple (slice (None , None , st ) for st , m in zip (step , nm_ , strict = True ) if m )
17801780 nparr = nparr [slice_ ]
@@ -4026,7 +4026,7 @@ def copy(array: NDArray, dtype: np.dtype | str = None, **kwargs: Any) -> NDArray
40264026 return array .copy (dtype , ** kwargs )
40274027
40284028
4029- def concat (arrays : list [NDArray ], / , axis = 0 , ** kwargs : Any ) -> NDArray : # noqa: C901
4029+ def concat (arrays : list [NDArray ], / , axis = 0 , ** kwargs : Any ) -> NDArray :
40304030 """Concatenate a list of arrays along a specified axis.
40314031
40324032 Parameters
@@ -4207,7 +4207,7 @@ def save(array: NDArray, urlpath: str, contiguous=True, **kwargs: Any) -> None:
42074207 array .save (urlpath , contiguous , ** kwargs )
42084208
42094209
4210- def asarray ( # noqa : C901
4210+ def asarray (
42114211 array : Sequence | np .ndarray | blosc2 .C2Array | NDArray , copy : bool | None = None , ** kwargs : Any
42124212) -> NDArray :
42134213 """Convert the `array` to an `NDArray`.
@@ -4347,7 +4347,7 @@ def astype(
43474347 return asarray (array , dtype = dtype , casting = casting , copy = copy , ** kwargs )
43484348
43494349
4350- def _check_ndarray_kwargs (** kwargs ): # noqa: C901
4350+ def _check_ndarray_kwargs (** kwargs ):
43514351 storage = kwargs .get ("storage" )
43524352 if storage is not None :
43534353 for key in kwargs :
0 commit comments