Skip to content

Commit 3dfe5f1

Browse files
committed
mypy fix
1 parent 2d161dd commit 3dfe5f1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pandas/core/sample.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ def sample(
150150
else:
151151
raise ValueError("Invalid weights: weights sum to zero")
152152

153+
if weights is not None:
153154
is_max_weight_dominating = size * weights.max() > 1
154155
if is_max_weight_dominating and not replace:
155156
raise ValueError(

0 commit comments

Comments
 (0)