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

refactored CheckNumericMixin #339

Merged
merged 9 commits into from
Nov 11, 2024
Merged

Conversation

limlam96
Copy link
Contributor

refactored for narwhals

spotted that this wasn't being used consistently across numeric file, so also addressed this

#336

@limlam96
Copy link
Contributor Author

TODO - make new test run in polars/pandas once baseimputer PR completes

@limlam96 limlam96 marked this pull request as ready for review October 30, 2024 16:01
tubular/mixins.py Outdated Show resolved Hide resolved
tests/mixins/test_CheckNumericMixin.py Outdated Show resolved Hide resolved
Copy link
Contributor

@davidhopkinson26 davidhopkinson26 left a comment

Choose a reason for hiding this comment

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

Thanks @limlam96!

@limlam96 limlam96 merged commit 10ced7a into main Nov 11, 2024
10 checks passed
@limlam96 limlam96 deleted the feature/narwhalify_numericmixin branch November 11, 2024 10:42
Comment on lines +180 to 181
# check weight not inf, not currently a narwhals efficient way to do this
if np.isinf(X[weights_column].to_numpy()).any():

Choose a reason for hiding this comment

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

Hey everyone! I wanted to reach out to mention that we just added Series|Expr.is_finite() method.
It is not fully consistent with nulls across different pandas dtype backends, but you check for null in the block above.

As we just made a release as well, it is available for narhwals>=1.14.

Have a good one 🎉

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hey, ah amazing! will have a play with this soon + appreciate you letting us know :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants