Skip to content

Commit

Permalink
docstring adaptations
Browse files Browse the repository at this point in the history
  • Loading branch information
JenniferHem committed Aug 28, 2024
1 parent 2b2d687 commit f87d68b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions molpipeline/estimators/chemprop/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -444,13 +444,13 @@ def _check_correct_input(
Parameters
----------
y : _type_
y : Sequence[int | float] | npt.NDArray[np.int_ | np.float64]
Indended classes for the dataset
Raises
------
ValueError
if the classes found in y are not matching n_classes or if the class labels do not start from 0 to n_classes-1
If the classes found in y are not matching n_classes or if the class labels do not start from 0 to n_classes-1.
"""
unique_y = np.unique(y)
log = []
Expand All @@ -460,7 +460,6 @@ def _check_correct_input(
)
if sorted(unique_y) != list(range(self.n_classes)):
err = f"Classes need to be in the range from 0 to {self.n_classes-1}. Found {unique_y}. Please correct the input data accordingly."
print(err)
log.append(err)
if log:
raise ValueError("\n".join(log))

0 comments on commit f87d68b

Please sign in to comment.