numpy/typing/_shape.py

from typing import Sequence, Tuple, Union, SupportsIndex

_Shape = Tuple[int, ...]

# Anything that can be coerced to a shape tuple
_ShapeLike = Union[SupportsIndex, Sequence[SupportsIndex]]
Metadata
View Raw File