Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoGorelli committed Jun 6, 2024
1 parent dce8a04 commit 2e5f5c8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/user-guide/expressions/user-defined-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,10 @@ Passing the full `Series` to the user-defined function has a cost: it may use a
You can use the `is_elementwise=True` argument to [:material-api: `map_batches`](https://docs.pola.rs/py-polars/html/reference/expressions/api/polars.Expr.map_batches.html) to stream results into the function, which means it might not get all values at once.

!!! note
The `is_elementwise` argument can lead to incorrect results if set incorrectly.
If you set `is_elementwise=True`, make sure that your function actually operates
element-by-element (e.g. "calculate the logarithm of each value") - our example function `diff_from_mean()`,
for instance, does not.
The `is_elementwise` argument can lead to incorrect results if set incorrectly.
If you set `is_elementwise=True`, make sure that your function actually operates
element-by-element (e.g. "calculate the logarithm of each value") - our example function `diff_from_mean()`,
for instance, does not.

## Return types

Expand Down

0 comments on commit 2e5f5c8

Please sign in to comment.