Skip to content

Commit 8d3d11c

Browse files
committed
lint fixes 2
1 parent 0f86e2f commit 8d3d11c

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

pandas/core/sample.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ def sample(
151151
raise ValueError("Invalid weights: weights sum to zero")
152152

153153
is_max_weight_dominating = size * max(weights) > 1
154-
if (is_max_weight_dominating and not replace):
154+
if is_max_weight_dominating and not replace:
155155
raise ValueError(
156156
"Invalid weights: If `replace`=False, "
157157
"total unit probabilities have to be less than 1"

pandas/tests/frame/methods/test_sample.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@ def test_sample_unit_probabilities_raises(self, obj):
156156
# should not raise
157157
obj.sample(n=2, weights=low_variance_weights, replace=False)
158158

159-
160159
def test_sample_zero_weights(self, obj):
161160
# All zeros raises errors
162161

0 commit comments

Comments
 (0)