summaryrefslogtreecommitdiff
path: root/numpy/typing/_scalars.py
diff options
context:
space:
mode:
authorBas van Beek <b.f.van.beek@vu.nl>2020-11-17 22:57:04 +0100
committerBas van Beek <b.f.van.beek@vu.nl>2020-11-17 22:57:04 +0100
commita3703dc8b95b533bd2626a53a483f532155dcc4f (patch)
tree6525561830349cb38e7b32f7340e6f66f3cb8cc7 /numpy/typing/_scalars.py
parent7f5392d2581e789917b8ba5352d821277d5de8ab (diff)
downloadnumpy-a3703dc8b95b533bd2626a53a483f532155dcc4f.tar.gz
ENH: Add `_UIntLike` and `_TD64Like`
Diffstat (limited to 'numpy/typing/_scalars.py')
-rw-r--r--numpy/typing/_scalars.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/numpy/typing/_scalars.py b/numpy/typing/_scalars.py
index d1a801cc2..90b2eff7b 100644
--- a/numpy/typing/_scalars.py
+++ b/numpy/typing/_scalars.py
@@ -10,11 +10,13 @@ _CharLike = Union[str, bytes]
# The 6 `<X>Like` 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]
-_NumberLike = Union[int, float, complex, np.number, np.bool_]
+_TD64Like = Union[_IntLike, np.timedelta64]
+_NumberLike = Union[int, float, complex, np.number, np.bool_]
_ScalarLike = Union[
int,
float,