Skip to content

Commit 4dc90a9

Browse files
authored
fix(python): Normalize by default in Series.entropy like Expr.entropy does (pola-rs#18493)
1 parent 63cc16f commit 4dc90a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: py-polars/polars/series/series.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2565,7 +2565,7 @@ def unique_counts(self) -> Series:
25652565
]
25662566
"""
25672567

2568-
def entropy(self, base: float = math.e, *, normalize: bool = False) -> float | None:
2568+
def entropy(self, base: float = math.e, *, normalize: bool = True) -> float | None:
25692569
"""
25702570
Computes the entropy.
25712571

0 commit comments

Comments
 (0)