We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Passing a list(categorical) to a registered plugin expr will instantly kill the kernel:
Assume this simple expression
#[polars_expr(output_type=Float64)] fn test(inputs: &[Series]) -> PolarsResult<Series> { Ok(Series::from_vec("TEST", vec![0.0])) }
Then this plugin code:
@pl.api.register_expr_namespace("testing") class TestSpace: def __init__(self, expr: pl.Expr): self._expr = expr def test(self) -> pl.Expr: """test""" return self._expr.register_plugin( lib=lib, symbol="test", is_elementwise=True, )
Now exucting this expression on list(categorical) will faill.
df = pl.DataFrame( {"x": [["1"]],}, schema={"x": pl.List(pl.Categorical)}, ) df.with_columns( pl.col("x").testing.test(), )
However this runs fine:
df = pl.DataFrame( {"x": [["1"]]}, schema={"x": pl.List(pl.Utf8)}, ) df.with_columns( pl.col("x").dist_list.test(), ) shape: (1, 1) ┌─────┐ │ x │ │ --- │ │ f64 │ ╞═════╡ │ 0.0 │ └─────┘
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Passing a list(categorical) to a registered plugin expr will instantly kill the kernel:
Assume this simple expression
Then this plugin code:
Now exucting this expression on list(categorical) will faill.
However this runs fine:
The text was updated successfully, but these errors were encountered: