-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
numpy 1.11 has different floordiv behavior on infinity and 0 comparing to numpy 1.10 #7709
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
Floor division is now computed using |
Mathematically, I guess On the sign: almost certainly related to testing for sign of ratio as |
I thought about that, but as I was replacing a |
In regular float division we replace
So I guess I agree that returning |
Yes, my logic was |
The argument for the other way round is that the divmod function determines the remainder first rather than doing a division. However, if |
@jreback Thoughts... |
This is the behavior in pandas master, which I think matches. On integers we do return a
|
@jreback Any preference on how it ought to behave? Note that current behavior doesn't keep me up at nights, but if we want to change it, it should be before 1.12. |
np.floor(np.inf) == np.inf`, so I think I have a slight tendency to prefer infinity as well. Not sure how it plays with divmod though. |
This seems fixed now, giving |
Uh oh!
There was an error while loading. Please reload this page.
I'm getting a different floordiv behavior when switching from 1.10 to 1.11. Is this intentional? It seems more inconsistent comparing to the normal division behavior:
This is on Linux 64-bit (numpy 1.11.0) from the conda environment with git_revision (4092a9e).
The text was updated successfully, but these errors were encountered: