-
Notifications
You must be signed in to change notification settings - Fork 367
Fix Series.div when divide by zero #1412
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
Changes from 9 commits
006f694
3a559cf
93fc548
bce4a7a
dd9b480
dbc99ec
b0fd81f
8260686
82e856c
0032eb4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -165,7 +165,7 @@ | |
|
|
||
| >>> df.rdiv(10) | ||
| angles degrees | ||
| circle NaN 0.027778 | ||
| circle inf 0.027778 | ||
| triangle 3.333333 0.055556 | ||
| rectangle 2.500000 0.027778 | ||
|
|
||
|
|
@@ -177,7 +177,7 @@ | |
|
|
||
| >>> df.rtruediv(10) | ||
| angles degrees | ||
| circle NaN 0.027778 | ||
| circle inf 0.027778 | ||
| triangle 3.333333 0.055556 | ||
| rectangle 2.500000 0.027778 | ||
|
|
||
|
|
@@ -225,21 +225,21 @@ | |
|
|
||
| >>> df // 10 | ||
| angles degrees | ||
| circle 0 36 | ||
| triangle 0 18 | ||
| rectangle 0 36 | ||
| circle 0.0 36.0 | ||
| triangle 0.0 18.0 | ||
| rectangle 0.0 36.0 | ||
|
|
||
| >>> df.floordiv(10) | ||
| angles degrees | ||
| circle 0 36 | ||
| triangle 0 18 | ||
| rectangle 0 36 | ||
| circle 0.0 36.0 | ||
| triangle 0.0 18.0 | ||
| rectangle 0.0 36.0 | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In short, since there is a possibility that the result can be a Someone can give an opinion about this? |
||
|
|
||
| >>> df.rfloordiv(10) | ||
| >>> df.rfloordiv(10) # doctest: +SKIP | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This test is moved to
>>> df.rfloordiv(10)
angles degrees
circle inf 0.0
triangle 3.000000 0.0
rectangle 2.000000 0.0
>>> df.rfloordiv(10)
angles degrees
circle inf 0.0
triangle 3.0 0.0
rectangle 2.0 0.0 |
||
| angles degrees | ||
| circle NaN 0 | ||
| triangle 3.0 0 | ||
| rectangle 2.0 0 | ||
| circle inf 0.0 | ||
| triangle 3.0 0.0 | ||
| rectangle 2.0 0.0 | ||
|
|
||
| Mod by constant with reverse version. | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI: In Python 3.x,
__div__and__rdiv__no more supported. Using__truediv__and__rtruediv__instead.