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.py24
1 files changed, 12 insertions, 12 deletions
diff --git a/numpy/typing/_array_like.py b/numpy/typing/_array_like.py
index d6473442c..35413393c 100644
--- a/numpy/typing/_array_like.py
+++ b/numpy/typing/_array_like.py
@@ -78,41 +78,41 @@ ArrayLike = Union[
],
]
-# `ArrayLike<X>`: array-like objects that can be coerced into `X`
+# `ArrayLike<X>_co`: array-like objects that can be coerced into `X`
# given the casting rules `same_kind`
-_ArrayLikeBool = _ArrayLike[
+_ArrayLikeBool_co = _ArrayLike[
"dtype[bool_]",
bool,
]
-_ArrayLikeUInt = _ArrayLike[
+_ArrayLikeUInt_co = _ArrayLike[
"dtype[Union[bool_, unsignedinteger[Any]]]",
bool,
]
-_ArrayLikeInt = _ArrayLike[
+_ArrayLikeInt_co = _ArrayLike[
"dtype[Union[bool_, integer[Any]]]",
Union[bool, int],
]
-_ArrayLikeFloat = _ArrayLike[
+_ArrayLikeFloat_co = _ArrayLike[
"dtype[Union[bool_, integer[Any], floating[Any]]]",
Union[bool, int, float],
]
-_ArrayLikeComplex = _ArrayLike[
+_ArrayLikeComplex_co = _ArrayLike[
"dtype[Union[bool_, integer[Any], floating[Any], complexfloating[Any, Any]]]",
Union[bool, int, float, complex],
]
-_ArrayLikeTD64 = _ArrayLike[
+_ArrayLikeTD64_co = _ArrayLike[
"dtype[Union[bool_, integer[Any], timedelta64]]",
Union[bool, int],
]
-_ArrayLikeDT64 = _NestedSequence[_SupportsArray["dtype[datetime64]"]]
-_ArrayLikeObject = _NestedSequence[_SupportsArray["dtype[object_]"]]
+_ArrayLikeDT64_co = _NestedSequence[_SupportsArray["dtype[datetime64]"]]
+_ArrayLikeObject_co = _NestedSequence[_SupportsArray["dtype[object_]"]]
-_ArrayLikeVoid = _NestedSequence[_SupportsArray["dtype[void]"]]
-_ArrayLikeStr = _ArrayLike[
+_ArrayLikeVoid_co = _NestedSequence[_SupportsArray["dtype[void]"]]
+_ArrayLikeStr_co = _ArrayLike[
"dtype[str_]",
str,
]
-_ArrayLikeBytes = _ArrayLike[
+_ArrayLikeBytes_co = _ArrayLike[
"dtype[bytes_]",
bytes,
]