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
ENH: Add overflow handling for negative integers scalar multiplication #21793
Conversation
I am wondering slightly whether we should care that |
I currently have it treated as an "unsigned" value for that exact reason. It doesn't break any tests so hopefully it isn't problematic. |
Ah, I had missed that. That works, since I don't have a super good idea right away though, one would be to rename the |
@Micky774 did you prefer keeping it as is, or rather introduce a new name for the |
I can adopt your suggestion and write a separate function for it. Apologies for the delays, I usually work on numpy stuff towards the end of the week :) |
@seberg I think this is ready now, there's just a problem w/ Travis CI |
Agreed, thanks @Micky774! |
assert() only takes one argument. This was recently introduced, in commit 4156ae2 (numpygh-21793)
Related Issues/PRs
Related to #21506
Follow-up to #21648
Changes
Adds checks for multiplication overflow for signed integers, in particular when they are negative.
Comments
N/A