Skip to content

Commit 471e100

Browse files
mkitticlaude
andcommitted
refactor: Use npt.NDArray[np.intp] as return type for _morton_order
More precise than Iterable[Sequence[int]] and accurately reflects the actual return value. Remove the now-unused Iterable import. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent e494191 commit 471e100

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/zarr/core/indexing.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import math
55
import numbers
66
import operator
7-
from collections.abc import Iterable, Iterator, Sequence
7+
from collections.abc import Iterator, Sequence
88
from dataclasses import dataclass
99
from enum import Enum
1010
from functools import lru_cache, reduce
@@ -1504,7 +1504,7 @@ def decode_morton_vectorized(
15041504

15051505

15061506
@lru_cache(maxsize=16)
1507-
def _morton_order(chunk_shape: tuple[int, ...]) -> Iterable[Sequence[int]]:
1507+
def _morton_order(chunk_shape: tuple[int, ...]) -> npt.NDArray[np.intp]:
15081508
n_total = product(chunk_shape)
15091509
n_dims = len(chunk_shape)
15101510
if n_total == 0:

0 commit comments

Comments
 (0)