Skip to content

Commit

Permalink
MAINT: Compatiblity for MNE 1.6 (#136)
Browse files Browse the repository at this point in the history
  • Loading branch information
mscheltienne authored Aug 23, 2023
1 parent 241cb4a commit 9b3c39f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
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

0 comments on commit 9b3c39f

Please sign in to comment.