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(python): Normalize by default in Series.entropy like Expr.entropy does #18493

Merged
merged 1 commit into from
Aug 31, 2024

Conversation

orlp
Copy link
Collaborator

@orlp orlp commented Aug 31, 2024

@stinodego Theoretically backwards-incompatible, but I consider it a bug that the Series method did something different than the Expr method. However, in any sensible use-case of Series.entropy the probabilities would have already summed to 1, meaning that turning on normalize shouldn't actually change behavior for users.

@github-actions github-actions bot added fix Bug fix python Related to Python Polars labels Aug 31, 2024
Copy link

codecov bot commented Aug 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.85%. Comparing base (a5dc30d) to head (7b8723b).
Report is 23 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #18493   +/-   ##
=======================================
  Coverage   79.84%   79.85%           
=======================================
  Files        1501     1501           
  Lines      202032   202032           
  Branches     2868     2868           
=======================================
+ Hits       161309   161328   +19     
+ Misses      40176    40157   -19     
  Partials      547      547           

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

@ritchie46
Copy link
Member

Given the inconsistency bug and that that proper usage would not break any code, I will merge this.

@ritchie46 ritchie46 merged commit 4dc90a9 into pola-rs:main Aug 31, 2024
16 checks passed
@c-peters c-peters added the accepted Ready for implementation label Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted Ready for implementation fix Bug fix python Related to Python Polars
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants