summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Berg <sebastianb@nvidia.com>2023-02-17 16:09:11 +0100
committerGitHub <noreply@github.com>2023-02-17 16:09:11 +0100
commit5db543e7acf8f45e55af104b0ae139d4475c7224 (patch)
tree6cf52e7f56451a3f17f84895f4eedb0e7bd76826
parentaf4e2b605fa6fcaa1cc218627b9d78572ad7dbcc (diff)
parent1a4a2adffb5ebc0f6b12a77a940bfcb2ebaa86bb (diff)
downloadnumpy-5db543e7acf8f45e55af104b0ae139d4475c7224.tar.gz
Merge pull request #23232 from FrancescElies/cesc-set-generic-parameters-to-any
TYP,MAINT: Add a missing explicit Any parameter to scalars
-rw-r--r--numpy/_typing/_scalars.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/numpy/_typing/_scalars.py b/numpy/_typing/_scalars.py
index 1ea88e957..e46ff04a0 100644
--- a/numpy/_typing/_scalars.py
+++ b/numpy/_typing/_scalars.py
@@ -10,13 +10,13 @@ _CharLike_co = Union[str, bytes]
# The 6 `<X>Like_co` type-aliases below represent all scalars that can be
# coerced into `<X>` (with the casting rule `same_kind`)
_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]
+_UIntLike_co = Union[_BoolLike_co, np.unsignedinteger[Any]]
+_IntLike_co = Union[_BoolLike_co, int, np.integer[Any]]
+_FloatLike_co = Union[_IntLike_co, float, np.floating[Any]]
+_ComplexLike_co = Union[_FloatLike_co, complex, np.complexfloating[Any, Any]]
_TD64Like_co = Union[_IntLike_co, np.timedelta64]
-_NumberLike_co = Union[int, float, complex, np.number, np.bool_]
+_NumberLike_co = Union[int, float, complex, np.number[Any], np.bool_]
_ScalarLike_co = Union[
int,
float,