Skip to content

Commit

Permalink
Allow selectors to select all available points (#137)
Browse files Browse the repository at this point in the history
  • Loading branch information
Luthaf authored Jun 28, 2022
1 parent 1bf9bcf commit 888395a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions skcosmo/_selection.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def fit(self, X, y=None, warm_start=False):

error_msg = (
"n_to_select must be either None, an "
f"integer in [1, n_{self.selection_type}s - 1] "
f"integer in [1, n_{self.selection_type}s] "
"representing the absolute "
f"number of {self.selection_type}s, or a float in (0, 1] "
f"representing a percentage of {self.selection_type}s to "
Expand All @@ -187,7 +187,7 @@ def fit(self, X, y=None, warm_start=False):
if self.n_to_select is None:
n_iterations = n_to_select_from // 2
elif isinstance(self.n_to_select, numbers.Integral):
if not 0 < self.n_to_select < n_to_select_from:
if not 0 < self.n_to_select <= n_to_select_from:
raise ValueError(error_msg)
n_iterations = self.n_to_select
elif isinstance(self.n_to_select, numbers.Real):
Expand Down

0 comments on commit 888395a

Please sign in to comment.