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(rust, python): pow return type evaluation #15506

Merged
merged 7 commits into from
Apr 6, 2024
Merged

Conversation

CanglongCl
Copy link
Contributor

@CanglongCl CanglongCl commented Apr 6, 2024

fix comment of #12129.

Now dtype of series returned from pow will be evaluate:

If exponent is float, it follows dtype of exponent. Otherwise, it follows dtype of base.

The behavior is the same as pow in python std lib and pow in num_trait.

@github-actions github-actions bot added fix Bug fix python Related to Python Polars rust Related to Rust Polars labels Apr 6, 2024
Copy link

codecov bot commented Apr 6, 2024

Codecov Report

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

Project coverage is 81.14%. Comparing base (31df06d) to head (9dd04d9).
Report is 1 commits behind head on main.

Files Patch % Lines
crates/polars-plan/src/dsl/function_expr/pow.rs 94.73% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #15506   +/-   ##
=======================================
  Coverage   81.14%   81.14%           
=======================================
  Files        1362     1362           
  Lines      174951   174931   -20     
  Branches     2533     2531    -2     
=======================================
- Hits       141960   141954    -6     
+ Misses      32508    32494   -14     
  Partials      483      483           

☔ 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.

Looks good @CanglongCl. Thank you.

@ritchie46 ritchie46 merged commit 7dfc53e into pola-rs:main Apr 6, 2024
24 checks passed
@CanglongCl CanglongCl deleted the pow branch April 7, 2024 05:23
philss added a commit to elixir-explorer/explorer that referenced this pull request Jul 19, 2024
If exponent is float, it follows dtype of exponent. Otherwise, it follows dtype of base.
See: pola-rs/polars#15506
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.

Dot product of two integer series is cast to float
2 participants