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

[FEA] Support Polars unary function negate. #17538

Open
taozuoqiao opened this issue Dec 6, 2024 · 1 comment · May be fixed by #17560
Open

[FEA] Support Polars unary function negate. #17538

taozuoqiao opened this issue Dec 6, 2024 · 1 comment · May be fixed by #17560
Assignees
Labels
cudf.polars Issues specific to cudf.polars feature request New feature or request

Comments

@taozuoqiao
Copy link

Unary function negate is not supported yet,

import polars as pl

lf = pl.LazyFrame(
    {
        "a": [1, 2, 3, 4],
    }
)

with pl.Config() as cfg:
    cfg.set_verbose(True)
    print(lf.select(-pl.col('a')).collect(engine='gpu'))
    print(lf.select(+pl.col('a')).collect(engine='gpu'))

"""
/opt/miniconda3_py310/lib/python3.10/site-packages/polars/lazyframe/frame.py:2053: PerformanceWarning: Query execution with GPU not supported, reason: <class 'NotImplementedError'>: Unary function name='negate'
  return wrap_df(ldf.collect(callback))
shape: (4, 1)
┌─────┐
│ a   │
│ --- │
│ i64 │
╞═════╡
│ -1  │
│ -2  │
│ -3  │
│ -4  │
└─────┘
shape: (4, 1)
┌─────┐
│ a   │
│ --- │
│ i64 │
╞═════╡
│ 1   │
│ 2   │
│ 3   │
│ 4   │
└─────┘
"""
@taozuoqiao taozuoqiao added the feature request New feature or request label Dec 6, 2024
@Matt711 Matt711 added the cudf.polars Issues specific to cudf.polars label Dec 9, 2024
@mroeschke
Copy link
Contributor

Thanks for the report!

I've opened up #17556 to support this operation, and it should hopefully be available in the next release (25.02)

@mroeschke mroeschke self-assigned this Dec 9, 2024
@mroeschke mroeschke linked a pull request Dec 10, 2024 that will close this issue
3 tasks
@GPUtester GPUtester moved this from Todo to In Progress in cuDF Python Dec 10, 2024
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 feature request New feature or request
Projects
Status: In Progress
3 participants