summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBas van Beek <b.f.van.beek@vu.nl>2020-11-17 22:55:45 +0100
committerBas van Beek <b.f.van.beek@vu.nl>2020-11-17 22:55:45 +0100
commit7f5392d2581e789917b8ba5352d821277d5de8ab (patch)
tree6f19881e9b07f6fb7b23b4c3f443658585a1f3b3
parent5da4a8e1835a11d5a03b715e9c0afe3bb96c883b (diff)
downloadnumpy-7f5392d2581e789917b8ba5352d821277d5de8ab.tar.gz
ENH: Add `_BoolLike` to the union defining `_IntLike`
-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 e4fc28b07..d1a801cc2 100644
--- a/numpy/typing/_scalars.py
+++ b/numpy/typing/_scalars.py
@@ -7,8 +7,10 @@ import numpy as np
_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_]
-_IntLike = Union[int, np.integer]
+_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_]