-
Notifications
You must be signed in to change notification settings - Fork 915
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
Return zero when floor dividing an integer data by zero #11441
Return zero when floor dividing an integer data by zero #11441
Conversation
@brandon-b-miller it looks like there's one code path somewhere that is (potentially erroneously) relying on the old behavior. |
Codecov Report
@@ Coverage Diff @@
## branch-22.10 #11441 +/- ##
===============================================
Coverage ? 86.41%
===============================================
Files ? 145
Lines ? 22975
Branches ? 0
===============================================
Hits ? 19853
Misses ? 3122
Partials ? 0 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Appears on the pandas side, there's some agreement that pandas nullable-int dtype should match the pandas non-nullable int dtype for this operation, although it differs from numpy: pandas-dev/pandas#48223
But as mentioned in #7389 (comment), if cuDF would like to implement a more realistic (from a math perspective) result from this operation, IMO it wouldn't be a bad thing. |
I'm completely happy with casting to float and returning 1 // pd.Series([2], dtype='Int64') |
In the 1 / 0 case, pandas has special logic to take the For non divide by zero results, the nullable types (should) match the non-nullable types (and numpy) and return int
|
This PR has been labeled |
#12074 fixes this to match modern panda (and would close this instead) |
PR is superseded by #12074 |
Closes #7389