Skip to content

Commit

Permalink
MAINT: Work around sklearn bug
Browse files Browse the repository at this point in the history
  • Loading branch information
larsoner committed Mar 13, 2024
1 parent 25e6aec commit 34a2672
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mne/preprocessing/tests/test_lof.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
# License: BSD-3-Clause
# Copyright the MNE-Python contributors.

import sys
from pathlib import Path

import pytest

from mne.io import read_raw_fif
from mne.preprocessing import find_bad_channels_lof
from mne.utils import check_version

base_dir = Path(__file__).parent.parent.parent / "io" / "tests" / "data"
raw_fname = base_dir / "test_raw.fif"
Expand All @@ -26,6 +28,8 @@
def test_lof(n_neighbors, ch_type, n_ch, n_bad):
"""Test LOF detection."""
pytest.importorskip("sklearn")
if sys.platform == "win32" and check_version("numpy", "2"):
pytest.skip("https://github.com/scikit-learn/scikit-learn/issues/28625")
raw = read_raw_fif(raw_fname).load_data()
assert raw.info["bads"] == []
bads, scores = find_bad_channels_lof(
Expand Down

0 comments on commit 34a2672

Please sign in to comment.