diff options
Diffstat (limited to 'numpy/typing/_array_like.py')
-rw-r--r-- | numpy/typing/_array_like.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/numpy/typing/_array_like.py b/numpy/typing/_array_like.py index 76c0c839c..1c00b200f 100644 --- a/numpy/typing/_array_like.py +++ b/numpy/typing/_array_like.py @@ -2,6 +2,7 @@ import sys from typing import Any, overload, Sequence, TYPE_CHECKING, Union from numpy import ndarray +from ._scalars import _ScalarLike from ._dtype_like import DtypeLike if sys.version_info >= (3, 8): @@ -31,4 +32,9 @@ else: # is resolved. See also the mypy issue: # # https://github.com/python/typing/issues/593 -ArrayLike = Union[bool, int, float, complex, _SupportsArray, Sequence] +ArrayLike = Union[ + _ScalarLike, + Sequence[_ScalarLike], + Sequence[Sequence[Any]], # TODO: Wait for support for recursive types + _SupportsArray, +] |