Skip to content

Commit 1e72320

Browse files
committed
pylint
1 parent c278f9a commit 1e72320

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lasso/math/sampling.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@ def unique_subsamples(start: int, end: int, n_samples: int, seed=None) -> np.nda
2525
"""
2626
assert start <= end
2727

28-
if end - start < n_samples:
29-
n_samples = end - start
30-
28+
n_samples = min(n_samples, end - start)
3129
random.seed(seed)
3230
indexes = np.array(random.sample(range(start, end), n_samples), dtype=np.int64)
3331
random.seed()

0 commit comments

Comments
 (0)