-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG/TST: Fix TimedeltaIndex comparisons with invalid types #24056
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 7 commits
50b0895
314d79c
4784705
f4731ea
be2018f
4955142
ea38d2d
85382c1
9df94d9
bd7527d
620d52e
9b02f5d
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 |
---|---|---|
|
@@ -1115,7 +1115,7 @@ def dispatch_to_series(left, right, func, str_rep=None, axis=None): | |
import pandas.core.computation.expressions as expressions | ||
|
||
right = lib.item_from_zerodim(right) | ||
if lib.is_scalar(right): | ||
if lib.is_scalar(right) or np.ndim(right) == 0: | ||
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. why is this needed? this should already be handled by is_scalar 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. because there are lots of weird things a user could pass that are zero-dim but not caught by is_scalar. The test case that hits this just passes |
||
|
||
def column_op(a, b): | ||
return {i: func(a.iloc[:, i], b) | ||
|
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.
you have a test hit this?
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.
Yes