-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: 2D DTA/TDA arithmetic with object-dtype #32185
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
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.
does this need a whatsnew note?
pandas/core/arrays/datetimelike.py
Outdated
# e.g. we've passed a Timestamp to TimedeltaArray | ||
res = res_values | ||
return res | ||
# Note: we are assuming here that shapes match. |
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.
pls add an assert then
@@ -2395,3 +2408,31 @@ def test_shift_months(years, months): | |||
raw = [x + pd.offsets.DateOffset(years=years, months=months) for x in dti] | |||
expected = DatetimeIndex(raw) | |||
tm.assert_index_equal(actual, expected) | |||
|
|||
|
|||
def test_dt64arr_addsub_object_dtype_2d(): |
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.
ok with either class based or free functions, mixing is slightly odd.
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.
yah, this is a bit of an odd-man-out because the class-based tests are all trying to use box_with_array, whereas this is specifically aiming at the 2D array case
@jreback gentle ping; this is a blocker for the upcoming blockwise frame-with-frame perf fix |
thanks. this looks user facing? if so can you follow up with a whatsnew note . |
The main motivation for this is that it is prerequisite for implementing frame-with-frame ops blockwise. It also fixes a few broken cases: