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): Support zero-copy conversion for temporal types in DataFrame.to_numpy #16429

Merged
merged 10 commits into from
May 23, 2024

Conversation

stinodego
Copy link
Member

@stinodego stinodego commented May 23, 2024

Closes #16415

Refactors the code to align more with how the Series view is made (though obviously there are some differences), and in the process allows zero copy support for Datetime and Duration types.

That's the last NumPy PR from me for now 😅

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

codecov bot commented May 23, 2024

Codecov Report

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

Project coverage is 81.43%. Comparing base (f0e38b5) to head (a714d42).
Report is 1 commits behind head on main.

Files Patch % Lines
py-polars/src/interop/numpy/to_numpy_df.rs 98.13% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #16429      +/-   ##
==========================================
+ Coverage   81.42%   81.43%   +0.01%     
==========================================
  Files        1409     1409              
  Lines      184594   184662      +68     
  Branches     2971     2971              
==========================================
+ Hits       150314   150388      +74     
+ Misses      33760    33754       -6     
  Partials      520      520              

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

@stinodego stinodego marked this pull request as ready for review May 23, 2024 09:35
@ritchie46 ritchie46 merged commit 462bc8b into main May 23, 2024
29 checks passed
@ritchie46 ritchie46 deleted the to-np-cleanup branch May 23, 2024 12:14
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.

Support zero copy for Datetime/Duration types in DataFrame.to_numpy
2 participants