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

Support unary negate in cudf.polars #17556

Closed
wants to merge 2 commits into from

Conversation

mroeschke
Copy link
Contributor

Description

closes #17538

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 Python Affects Python cuDF API. improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Dec 9, 2024
@mroeschke mroeschke self-assigned this Dec 9, 2024
@mroeschke mroeschke requested a review from a team as a code owner December 9, 2024 22:49
@github-actions github-actions bot added the cudf.polars Issues specific to cudf.polars label Dec 9, 2024
Copy link
Contributor

@Matt711 Matt711 left a comment

Choose a reason for hiding this comment

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

Just one tiny suggestion

Copy link
Contributor

@bdice bdice left a comment

Choose a reason for hiding this comment

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

I'm actually a little surprised we don't have a proper unary negate operator in libcudf or pylibcudf and have to resort to -1 * input. That is a pretty common need, and we've had it come up with pandas in the past:

I wanted to make sure we're not missing any cases here. What if the inputs are bools? It seems that polars doesn't support unary negation on boolean columns. Does pylibcudf do any implicit upcasting from boolean to integer types? Would it get the same result? Do we need to guard against that possibility?

@mroeschke
Copy link
Contributor Author

Going to close in favor of #17560

@mroeschke mroeschke closed this Dec 10, 2024
@mroeschke mroeschke deleted the enh/polars/negate branch December 10, 2024 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cudf.polars Issues specific to cudf.polars improvement Improvement / enhancement to an existing function non-breaking Non-breaking change Python Affects Python cuDF API.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[FEA] Support Polars unary function negate.
3 participants