Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAINT: Compatiblity for MNE 1.6 #136

Merged
merged 1 commit into from
Aug 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions mne_icalabel/features/tests/test_topomap.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@

import numpy as np
import pytest
from mne import pick_info
from mne.datasets import testing
from mne.io import read_raw
from mne.io.pick import (
_get_channel_types,
_pick_data_channels,
_picks_to_idx,
pick_info,
)
from mne.preprocessing import ICA
from mne.utils import check_version

if check_version("mne", "1.6"):
from mne._fiff.pick import _get_channel_types, _pick_data_channels, _picks_to_idx
else:
from mne.io.pick import _get_channel_types, _pick_data_channels, _picks_to_idx

from mne_icalabel.features import get_topomaps

Expand Down
15 changes: 7 additions & 8 deletions mne_icalabel/features/topomap.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
from typing import Dict, Union

import numpy as np
from mne import Info, pick_info
from mne.channels.layout import _find_topomap_coords
from mne.defaults import _BORDER_DEFAULT, _EXTRAPOLATE_DEFAULT, _INTERPOLATION_DEFAULT
from mne.io import Info
from mne.io.pick import (
_get_channel_types,
_pick_data_channels,
_picks_to_idx,
pick_info,
)
from mne.preprocessing import ICA
from mne.utils import _validate_type
from mne.utils import _validate_type, check_version
from mne.viz.topomap import _check_extrapolate, _make_head_outlines, _setup_interp
from numpy.typing import NDArray

if check_version("mne", "1.6"):
from mne._fiff.pick import _get_channel_types, _pick_data_channels, _picks_to_idx
else:
from mne.io.pick import _get_channel_types, _pick_data_channels, _picks_to_idx

from ..utils._checks import _validate_ica
from ..utils._docs import fill_doc

Expand Down