Skip to content

Commit 41d19a0

Browse files
committed
fix: break if n features remaining <= 0
1 parent 2bcee67 commit 41d19a0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

python/rapidstats/selection.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,9 @@ def fit(
265265
real_step = _get_step(len_features, step)
266266
k = len_features - real_step
267267

268+
if k <= 0:
269+
break
270+
268271
remaining_features = (
269272
pl.LazyFrame(
270273
{"importance": self.importance(state), "feature": features}

0 commit comments

Comments
 (0)