summaryrefslogtreecommitdiff
path: root/numpy/typing/_array_like.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/typing/_array_like.py')
-rw-r--r--numpy/typing/_array_like.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/numpy/typing/_array_like.py b/numpy/typing/_array_like.py
index ea9ade295..02f264222 100644
--- a/numpy/typing/_array_like.py
+++ b/numpy/typing/_array_like.py
@@ -57,6 +57,12 @@ _FiniteNestedSequence = Union[
Sequence[Sequence[Sequence[Sequence[_T]]]],
]
+# A subset of `npt.ArrayLike` that can be parametrized w.r.t. `np.generic`
+_ArrayLike = Union[
+ _SupportsArray["dtype[_ScalarType]"],
+ _NestedSequence[_SupportsArray["dtype[_ScalarType]"]],
+]
+
# A union representing array-like objects; consists of two typevars:
# One representing types that can be parametrized w.r.t. `np.dtype`
# and another one for the rest