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: Error on some invalid clip inputs #14416

Merged
merged 2 commits into from
Feb 11, 2024
Merged

fix: Error on some invalid clip inputs #14416

merged 2 commits into from
Feb 11, 2024

Conversation

stinodego
Copy link
Member

@stinodego stinodego commented Feb 11, 2024

Ref #11385
Ref #14413

Before

import polars as pl

s = pl.Series([1, 2, 3, 4], dtype=pl.UInt32)
result = s.clip(-1, 5)
print(result)
shape: (4,)
Series: '' [u32]
[
        null
        null
        null
        null
]

After

polars.exceptions.ComputeError: conversion from `i32` to `u32` failed in column 'literal' for 1 out of 1 values: [-1]

@github-actions github-actions bot added fix Bug fix python Related to Python Polars rust Related to Rust Polars labels Feb 11, 2024
@stinodego stinodego marked this pull request as ready for review February 11, 2024 10:06
@ritchie46 ritchie46 merged commit 2e3e793 into main Feb 11, 2024
25 checks passed
@ritchie46 ritchie46 deleted the clip-types branch February 11, 2024 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Bug fix python Related to Python Polars rust Related to Rust Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants