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

feat(python): Avoid an extra copy when converting Boolean Series to writable NumPy array #16164

Merged
merged 2 commits into from
May 11, 2024

Conversation

stinodego
Copy link
Member

Ref #14334

Moving more of the to_numpy implementation to Rust. This allows to create writable boolean arrays in one go, rather than casting to u8 and then copying.

@github-actions github-actions bot added enhancement New feature or an improvement of an existing feature python Related to Python Polars labels May 10, 2024
Copy link

codecov bot commented May 11, 2024

Codecov Report

Attention: Patch coverage is 92.07921% with 8 lines in your changes are missing coverage. Please review.

Project coverage is 81.00%. Comparing base (2004f5b) to head (e95ccc6).
Report is 6 commits behind head on main.

Files Patch % Lines
py-polars/src/series/export.rs 92.00% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #16164      +/-   ##
==========================================
+ Coverage   80.95%   81.00%   +0.04%     
==========================================
  Files        1386     1387       +1     
  Lines      178462   178823     +361     
  Branches     2881     2877       -4     
==========================================
+ Hits       144473   144851     +378     
+ Misses      33497    33479      -18     
- Partials      492      493       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@ritchie46 ritchie46 left a comment

Choose a reason for hiding this comment

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

There are a few into_iter's that should be iters.

py-polars/src/series/export.rs Show resolved Hide resolved
py-polars/src/series/export.rs Outdated Show resolved Hide resolved
py-polars/src/series/export.rs Outdated Show resolved Hide resolved
py-polars/src/series/export.rs Outdated Show resolved Hide resolved
@ritchie46 ritchie46 merged commit 172299c into main May 11, 2024
18 checks passed
@ritchie46 ritchie46 deleted the np-to-rust branch May 11, 2024 07:13
Wouittone pushed a commit to Wouittone/polars that referenced this pull request Jun 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or an improvement of an existing feature python Related to Python Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants