Skip to content

Commit

Permalink
Fix flake8 for utils and tests (scikit-adaptation#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
kachayev authored and YanisLalou committed Feb 6, 2024
1 parent 3451e93 commit 1afde5b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion skada/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
)
from sklearn.utils.multiclass import type_of_target


_logger = logging.getLogger('skada')
_logger.setLevel(logging.DEBUG)

Expand Down Expand Up @@ -93,7 +94,7 @@ def _find_y_type(y):
"""

# We need to check for this case first because
# type_of_target() doesnt handle nan values
# type_of_target() doesn't handle nan values
if np.any(np.isnan(y)):
if y.ndim != 1:
raise ValueError("For a regression task, "
Expand Down
10 changes: 5 additions & 5 deletions skada/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
import pytest

import numpy as np
from skada.datasets import (
make_dataset_from_moons_distribution
)

from skada.datasets import make_dataset_from_moons_distribution
from skada.utils import (
check_X_y_domain, check_X_domain,
extract_source_indices
extract_source_indices,
source_target_split,
source_target_merge
)
from skada.utils import source_target_split, source_target_merge
from skada.utils import source_target_split
from skada._utils import _check_y_masking


Expand Down

0 comments on commit 1afde5b

Please sign in to comment.