-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
fix Timedelta.__mul__(NaT) #19819
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
fix Timedelta.__mul__(NaT) #19819
Conversation
Codecov Report
@@ Coverage Diff @@
## master #19819 +/- ##
=======================================
Coverage 91.61% 91.61%
=======================================
Files 150 150
Lines 48892 48892
=======================================
Hits 44792 44792
Misses 4100 4100
Continue to review full report at Codecov.
|
def test_td_mul_nat(self, op, td_nat): | ||
# GH#19819 | ||
td = Timedelta(10, unit='d') | ||
with pytest.raises(TypeError): |
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.
why do we raise on this again? what is the behavior on divide?
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.
For the same reason we raise on Timedelta * timedelta
(or Timedelta * datetime
depending on what hat pd.NaT
is wearing).
For division Timedelta / pd.NaT
returns np.nan
, which is already correct.
thanks |
git diff upstream/master -u -- "*.py" | flake8 --diff