Closed
Description
When trying to use numpy.typing
-provided aliases for integer-like scalars in scipy/scipy#10844 (review), I noticed that numpy.typing
doesn't have the right alias. It does have:
_IntLike = Union[_BoolLike, int, np.integer]
but accepting bools as 0/1 where integers are expected isn't good practice.
Accepting integers for float-like is fine, and mypy does accept int
if you annotate a variable as float
. Complex I'm not sure about, but I'd think it's undesirable to accept ints/floats for complex-like.