summaryrefslogtreecommitdiff
path: root/numpy/typing/_array_like.py
diff options
context:
space:
mode:
authorBas van Beek <b.f.van.beek@vu.nl>2022-01-24 17:22:19 +0100
committerBas van Beek <b.f.van.beek@vu.nl>2022-01-24 17:29:37 +0100
commit3fbe9852265220c77d8808210539b736be75c8c1 (patch)
treef20ecc735c7ec9aa214370551c3c63ecddcd2e6b /numpy/typing/_array_like.py
parent5264dc220dc208e533bdbdcafa9f4f06ddb04aab (diff)
downloadnumpy-3fbe9852265220c77d8808210539b736be75c8c1.tar.gz
MAINT: Rename the old `_ArrayLike` parameter used inside the `_array_like` module
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 bba545b7b..ea9ade295 100644
--- a/numpy/typing/_array_like.py
+++ b/numpy/typing/_array_like.py
@@ -60,7 +60,7 @@ _FiniteNestedSequence = Union[
# 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
-_ArrayLike = Union[
+_DualArrayLike = Union[
_SupportsArray[_DType],
_NestedSequence[_SupportsArray[_DType]],
_T,
@@ -74,38 +74,38 @@ _ArrayLike = Union[
# is resolved. See also the mypy issue:
#
# https://github.com/python/typing/issues/593
-ArrayLike = _ArrayLike[
+ArrayLike = _DualArrayLike[
dtype,
Union[bool, int, float, complex, str, bytes],
]
# `ArrayLike<X>_co`: array-like objects that can be coerced into `X`
# given the casting rules `same_kind`
-_ArrayLikeBool_co = _ArrayLike[
+_ArrayLikeBool_co = _DualArrayLike[
"dtype[bool_]",
bool,
]
-_ArrayLikeUInt_co = _ArrayLike[
+_ArrayLikeUInt_co = _DualArrayLike[
"dtype[Union[bool_, unsignedinteger[Any]]]",
bool,
]
-_ArrayLikeInt_co = _ArrayLike[
+_ArrayLikeInt_co = _DualArrayLike[
"dtype[Union[bool_, integer[Any]]]",
Union[bool, int],
]
-_ArrayLikeFloat_co = _ArrayLike[
+_ArrayLikeFloat_co = _DualArrayLike[
"dtype[Union[bool_, integer[Any], floating[Any]]]",
Union[bool, int, float],
]
-_ArrayLikeComplex_co = _ArrayLike[
+_ArrayLikeComplex_co = _DualArrayLike[
"dtype[Union[bool_, integer[Any], floating[Any], complexfloating[Any, Any]]]",
Union[bool, int, float, complex],
]
-_ArrayLikeNumber_co = _ArrayLike[
+_ArrayLikeNumber_co = _DualArrayLike[
"dtype[Union[bool_, number[Any]]]",
Union[bool, int, float, complex],
]
-_ArrayLikeTD64_co = _ArrayLike[
+_ArrayLikeTD64_co = _DualArrayLike[
"dtype[Union[bool_, integer[Any], timedelta64]]",
Union[bool, int],
]
@@ -122,16 +122,16 @@ _ArrayLikeVoid_co = Union[
_SupportsArray["dtype[void]"],
_NestedSequence[_SupportsArray["dtype[void]"]],
]
-_ArrayLikeStr_co = _ArrayLike[
+_ArrayLikeStr_co = _DualArrayLike[
"dtype[str_]",
str,
]
-_ArrayLikeBytes_co = _ArrayLike[
+_ArrayLikeBytes_co = _DualArrayLike[
"dtype[bytes_]",
bytes,
]
-_ArrayLikeInt = _ArrayLike[
+_ArrayLikeInt = _DualArrayLike[
"dtype[integer[Any]]",
int,
]