summaryrefslogtreecommitdiff
path: root/numpy/typing/_scalars.py
diff options
context:
space:
mode:
authorBas van Beek <b.f.van.beek@vu.nl>2021-01-18 16:03:27 +0100
committerBas van Beek <b.f.van.beek@vu.nl>2021-01-18 16:12:24 +0100
commit92fd7edc7033ee49669f63675c12cbbefe53a8bc (patch)
treec100c0b7fae09ba332cbbd34644c7e73867cca97 /numpy/typing/_scalars.py
parent2908338b19c26c043eab61c2af7bdff96b02b1bc (diff)
downloadnumpy-92fd7edc7033ee49669f63675c12cbbefe53a8bc.tar.gz
MAINT: Renamed `<X>Like` to `<X>Like_co`
Diffstat (limited to 'numpy/typing/_scalars.py')
-rw-r--r--numpy/typing/_scalars.py28
1 files changed, 14 insertions, 14 deletions
diff --git a/numpy/typing/_scalars.py b/numpy/typing/_scalars.py
index 90b2eff7b..516b996dc 100644
--- a/numpy/typing/_scalars.py
+++ b/numpy/typing/_scalars.py
@@ -2,22 +2,22 @@ from typing import Union, Tuple, Any
import numpy as np
-# NOTE: `_StrLike` and `_BytesLike` are pointless, as `np.str_` and `np.bytes_`
-# are already subclasses of their builtin counterpart
+# NOTE: `_StrLike_co` and `_BytesLike_co` are pointless, as `np.str_` and
+# `np.bytes_` are already subclasses of their builtin counterpart
-_CharLike = Union[str, bytes]
+_CharLike_co = Union[str, bytes]
-# The 6 `<X>Like` type-aliases below represent all scalars that can be
+# The 6 `<X>Like_co` type-aliases below represent all scalars that can be
# coerced into `<X>` (with the casting rule `same_kind`)
-_BoolLike = Union[bool, np.bool_]
-_UIntLike = Union[_BoolLike, np.unsignedinteger]
-_IntLike = Union[_BoolLike, int, np.integer]
-_FloatLike = Union[_IntLike, float, np.floating]
-_ComplexLike = Union[_FloatLike, complex, np.complexfloating]
-_TD64Like = Union[_IntLike, np.timedelta64]
+_BoolLike_co = Union[bool, np.bool_]
+_UIntLike_co = Union[_BoolLike_co, np.unsignedinteger]
+_IntLike_co = Union[_BoolLike_co, int, np.integer]
+_FloatLike_co = Union[_IntLike_co, float, np.floating]
+_ComplexLike_co = Union[_FloatLike_co, complex, np.complexfloating]
+_TD64Like_co = Union[_IntLike_co, np.timedelta64]
-_NumberLike = Union[int, float, complex, np.number, np.bool_]
-_ScalarLike = Union[
+_NumberLike_co = Union[int, float, complex, np.number, np.bool_]
+_ScalarLike_co = Union[
int,
float,
complex,
@@ -26,5 +26,5 @@ _ScalarLike = Union[
np.generic,
]
-# `_VoidLike` is technically not a scalar, but it's close enough
-_VoidLike = Union[Tuple[Any, ...], np.void]
+# `_VoidLike_co` is technically not a scalar, but it's close enough
+_VoidLike_co = Union[Tuple[Any, ...], np.void]