-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Fix+test DTI/TDI/PI add/sub with ndarray[datetime64/timedelta64] #19847
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
Conversation
@jbrockmendel : Good direction so far! Looks you can parametrize now since all the CI is green. |
pandas/core/indexes/datetimelike.py
Outdated
if is_datetime64_dtype(other) and is_timedelta64_dtype(self): | ||
# ndarray[datetime64] cannot be subtracted from self, so | ||
# we need to wrap in DatetimeIndex and flip the operation | ||
from pandas.core.indexes.datetimes import DatetimeIndex |
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.
since inside a function, can just import from pandas directrly
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.
atually pls change all imports that are inside functions to do this (its just shorter)
Codecov Report
@@ Coverage Diff @@
## master #19847 +/- ##
=========================================
Coverage ? 91.69%
=========================================
Files ? 150
Lines ? 48920
Branches ? 0
=========================================
Hits ? 44857
Misses ? 4063
Partials ? 0
Continue to review full report at Codecov.
|
needs a rebase. does this fix any open issue? |
Not that I'm aware of. |
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.
this needs a whatsnew note to show what is a bug fix / enhancement / api change (IOW what works now that didn't work before)
# ------------------------------------------------------------- | ||
# __add__/__sub__ with ndarray[datetime64] and ndarray[timedelta64] | ||
|
||
def test_dti_add_dt64_array_raises(self, tz): |
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.
these tests don't exist already? odd
Here too Travis error is pyarrow import |
thanks |
Two notes for upcoming passes: