Skip to content

Commit 888395a

Browse files
authored
Allow selectors to select all available points (#137)
1 parent 1bf9bcf commit 888395a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

skcosmo/_selection.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ def fit(self, X, y=None, warm_start=False):
176176

177177
error_msg = (
178178
"n_to_select must be either None, an "
179-
f"integer in [1, n_{self.selection_type}s - 1] "
179+
f"integer in [1, n_{self.selection_type}s] "
180180
"representing the absolute "
181181
f"number of {self.selection_type}s, or a float in (0, 1] "
182182
f"representing a percentage of {self.selection_type}s to "
@@ -187,7 +187,7 @@ def fit(self, X, y=None, warm_start=False):
187187
if self.n_to_select is None:
188188
n_iterations = n_to_select_from // 2
189189
elif isinstance(self.n_to_select, numbers.Integral):
190-
if not 0 < self.n_to_select < n_to_select_from:
190+
if not 0 < self.n_to_select <= n_to_select_from:
191191
raise ValueError(error_msg)
192192
n_iterations = self.n_to_select
193193
elif isinstance(self.n_to_select, numbers.Real):

0 commit comments

Comments
 (0)