diff options
Diffstat (limited to 'numpy/typing/_array_like.py')
-rw-r--r-- | numpy/typing/_array_like.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/typing/_array_like.py b/numpy/typing/_array_like.py index 54a612fb4..b73585cf0 100644 --- a/numpy/typing/_array_like.py +++ b/numpy/typing/_array_like.py @@ -1,5 +1,5 @@ import sys -from typing import Any, overload, Sequence, Tuple, Union +from typing import Any, overload, Sequence, TYPE_CHECKING, Union from numpy import ndarray from ._dtype_like import DtypeLike @@ -15,7 +15,7 @@ else: else: HAVE_PROTOCOL = True -if HAVE_PROTOCOL: +if TYPE_CHECKING or HAVE_PROTOCOL: class _SupportsArray(Protocol): @overload def __array__(self, __dtype: DtypeLike = ...) -> ndarray: ... |