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 floating point error checking to (almost) all casts #21437
Commits on Jun 13, 2022
-
ENH: Check floating point error flags for all casts
To achieve this, I first need to propagate the ArrayMethod information that FPE flags _may_ be given for a specific cast. This requires quite a bit of changes (which is arguably the more annoying part of the PR/commit). Note that for some "legacy" casts, we do not modify this and assume that the only interesting information is `needs_api`.
Configuration menu - View commit details
-
Copy full SHA for 8735980 - Browse repository at this point
Copy the full SHA 8735980View commit details -
Configuration menu - View commit details
-
Copy full SHA for 341d988 - Browse repository at this point
Copy the full SHA 341d988View commit details -
Configuration menu - View commit details
-
Copy full SHA for 84fd4a5 - Browse repository at this point
Copy the full SHA 84fd4a5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 35dae70 - Browse repository at this point
Copy the full SHA 35dae70View commit details -
WIP,TST: Add exhaustive test for FPEs in casts
unfortunately, I had to realize that float -> integer casts are not well defined when values are out of range for the integer. This is a problem with C, but means that neither the warnings seem to be particularly well defined... (I suspect, on my CPU it either warns OR gives "valid" integer overflow results, but the question is if that is even universally true...)
Configuration menu - View commit details
-
Copy full SHA for 54d6ac5 - Browse repository at this point
Copy the full SHA 54d6ac5View commit details -
Configuration menu - View commit details
-
Copy full SHA for d53fe91 - Browse repository at this point
Copy the full SHA d53fe91View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4c2a3d0 - Browse repository at this point
Copy the full SHA 4c2a3d0View commit details -
Configuration menu - View commit details
-
Copy full SHA for a5bf28b - Browse repository at this point
Copy the full SHA a5bf28bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 96fd8ba - Browse repository at this point
Copy the full SHA 96fd8baView commit details -
TST: Fix the weird boolean+advanced indexing test
The test meant to assert shapes, but didn't actually do it.
Configuration menu - View commit details
-
Copy full SHA for fc865d8 - Browse repository at this point
Copy the full SHA fc865d8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 219697a - Browse repository at this point
Copy the full SHA 219697aView commit details -
BUG: Fix needs_api for avanced assignments without subspace and remov…
…e unnecessary delay The delay is not necessary, because the iterator does not cast in any case, so we do not actually care about the possibility of errors being raised.
Configuration menu - View commit details
-
Copy full SHA for 9c74efa - Browse repository at this point
Copy the full SHA 9c74efaView commit details -
Configuration menu - View commit details
-
Copy full SHA for d41f1de - Browse repository at this point
Copy the full SHA d41f1deView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8d2d9a5 - Browse repository at this point
Copy the full SHA 8d2d9a5View commit details -
Configuration menu - View commit details
-
Copy full SHA for b463a7f - Browse repository at this point
Copy the full SHA b463a7fView commit details -
BUG: Avoid
NpyIter_EnableExternalLoop
as it resets the bufferResetting the buffer will copy it, which may cause casting errors. And we want to prefer/catch those later ideally.
Configuration menu - View commit details
-
Copy full SHA for 63fa74a - Browse repository at this point
Copy the full SHA 63fa74aView commit details -
Configuration menu - View commit details
-
Copy full SHA for a7e58a7 - Browse repository at this point
Copy the full SHA a7e58a7View commit details -
TST: Add final set of cast (and FPE in cast) test to ufuncs
The remaining uncovered paths seem to me like code that should be effectively unreachable. (I do actually wonder if `PyArray_MapIterReset` should be removed.)
Configuration menu - View commit details
-
Copy full SHA for f7b0493 - Browse repository at this point
Copy the full SHA f7b0493View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7e6d8ef - Browse repository at this point
Copy the full SHA 7e6d8efView commit details -
Configuration menu - View commit details
-
Copy full SHA for a546ee1 - Browse repository at this point
Copy the full SHA a546ee1View commit details