Skip to content
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 binop with LHS numpy datetimelike scalar #17226

Merged
merged 2 commits into from
Oct 31, 2024

Conversation

mroeschke
Copy link
Contributor

Description

closes #17087

For binops, cudf tries to convert a 0D numpy array to a numpy scalar via .dtype.type(value), but .dtype.type requires other parameters if its a numpy.datetime64 or numpy.timedelta64. Indexing via [()] will perform this conversion correctly.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@mroeschke mroeschke added bug Something isn't working Python Affects Python cuDF API. non-breaking Non-breaking change labels Oct 31, 2024
@mroeschke mroeschke requested a review from a team as a code owner October 31, 2024 17:57
Copy link
Contributor

@vyasr vyasr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice find Matt!

@mroeschke
Copy link
Contributor Author

/merge

@rapids-bot rapids-bot bot merged commit 6055393 into rapidsai:branch-24.12 Oct 31, 2024
102 checks passed
@mroeschke mroeschke deleted the bug/binop/lhs_np_scalar branch October 31, 2024 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working non-breaking Non-breaking change Python Affects Python cuDF API.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[BUG] datetime comparison is sensitive to ordering with different precision
3 participants