summaryrefslogtreecommitdiff
path: root/numpy/typing/_array_like.py
diff options
context:
space:
mode:
authorBas van Beek <43369155+BvB93@users.noreply.github.com>2021-06-05 23:37:58 +0200
committerBas van Beek <43369155+BvB93@users.noreply.github.com>2021-06-05 23:37:58 +0200
commitb180427f55f8d12237b5f3e46b2cb5c96033e92c (patch)
tree7e7237a2ffdd090e48de29da5b023dfcaa28e7d0 /numpy/typing/_array_like.py
parent7162dc3c9f3cc02434c50dfb4e55b790453c00a4 (diff)
downloadnumpy-b180427f55f8d12237b5f3e46b2cb5c96033e92c.tar.gz
MAINT: Added a missing `sys.version` check
Diffstat (limited to 'numpy/typing/_array_like.py')
-rw-r--r--numpy/typing/_array_like.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/typing/_array_like.py b/numpy/typing/_array_like.py
index 187dfb96a..3bdbed8f8 100644
--- a/numpy/typing/_array_like.py
+++ b/numpy/typing/_array_like.py
@@ -34,7 +34,7 @@ _ScalarType = TypeVar("_ScalarType", bound=generic)
_DType = TypeVar("_DType", bound="dtype[Any]")
_DType_co = TypeVar("_DType_co", covariant=True, bound="dtype[Any]")
-if TYPE_CHECKING or _HAS_TYPING_EXTENSIONS:
+if TYPE_CHECKING or _HAS_TYPING_EXTENSIONS or sys.version_info >= (3, 8):
# The `_SupportsArray` protocol only cares about the default dtype
# (i.e. `dtype=None` or no `dtype` parameter at all) of the to-be returned
# array.