-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
BUG: type checking broken with np.sinc #21898
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This seems to be the same issue as #20099, which in turn is causes by a mypy bug (python/mypy#11347). A pr was created for the issue upstream, but I've yet to see it merged. |
Thanks. It does sound related, so feel free to close. I'm still a bit confused why This also seems to be partly caused by |
Yeah, #19252 goes into it it more details, but the gist of the problem is that there is no convenient way of mapping |
Ah, I might have been too quick to open #21900 then. Feel free to close it as duplicate. |
Describe the issue:
There seems to be something whacky with the type annotations for np.sinc that causes mypy to later think that an array is a boolean array when clearly it is not. See the reproducing code below. This seems to have started with numpy 1.22 (presumably due to the more accuracy dtype annotations). Changing
np.sinc
tonp.sin
ornp.exp
makes the problem disappear, which is why I assume it is specific tosinc
.Reproduce the code example:
Error message:
Note the
bool_
on the first line.The text was updated successfully, but these errors were encountered: