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): Add allow_copy parameter to DataFrame.to_numpy #14569

Merged
merged 3 commits into from
Feb 18, 2024
Merged

Conversation

stinodego
Copy link
Member

@stinodego stinodego commented Feb 18, 2024

Ref #14334

Changes

  • Add allow_copy parameter to DataFrame.to_numpy, which will raise an error if a copy is required to perform the conversion
  • For Series.to_numpy, deprecate the zero_copy_only parameter in favor of allow_copy which is the inverse.

@stinodego stinodego added the deprecation Add a deprecation warning to outdated functionality label Feb 18, 2024
@github-actions github-actions bot added enhancement New feature or an improvement of an existing feature python Related to Python Polars labels Feb 18, 2024
Copy link

codecov bot commented Feb 18, 2024

Codecov Report

Attention: 18 lines in your changes are missing coverage. Please review.

Comparison is base (f044280) 80.77% compared to head (0094802) 77.89%.
Report is 4 commits behind head on main.

❗ Current head 0094802 differs from pull request most recent head 8886c9f. Consider uploading reports for the commit 8886c9f to get more accurate results

Files Patch % Lines
py-polars/polars/series/series.py 0.00% 11 Missing ⚠️
py-polars/polars/dataframe/frame.py 0.00% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #14569      +/-   ##
==========================================
- Coverage   80.77%   77.89%   -2.89%     
==========================================
  Files        1326     1326              
  Lines      173035   173045      +10     
  Branches     2439     2441       +2     
==========================================
- Hits       139773   134790    -4983     
- Misses      32791    37812    +5021     
+ Partials      471      443      -28     

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

@stinodego stinodego merged commit ade4463 into main Feb 18, 2024
12 checks passed
@stinodego stinodego deleted the allow-copy branch February 18, 2024 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deprecation Add a deprecation warning to outdated functionality 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