Skip to content

Commit d6d2f8c

Browse files
authored
Sort imports (#12097)
1 parent e1545e6 commit d6d2f8c

File tree

605 files changed

+4706
-4686
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

605 files changed

+4706
-4686
lines changed

examples/datasets/hf_sef_data.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@
1414
# %%
1515

1616

17-
import mne
1817
import os
18+
19+
import mne
1920
from mne.datasets import hf_sef
2021

2122
fname_evoked = os.path.join(hf_sef.data_path(), "MEG/subject_b/hf_sef_15min-ave.fif")

examples/datasets/limo_data.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,13 @@
3838

3939
# %%
4040

41-
import numpy as np
4241
import matplotlib.pyplot as plt
42+
import numpy as np
4343

44+
from mne import combine_evoked
4445
from mne.datasets.limo import load_data
4546
from mne.stats import linear_regression
46-
from mne.viz import plot_events, plot_compare_evokeds
47-
from mne import combine_evoked
48-
47+
from mne.viz import plot_compare_evokeds, plot_events
4948

5049
print(__doc__)
5150

examples/datasets/opm_data.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# sphinx_gallery_thumbnail_number = 4
1414

1515
import numpy as np
16+
1617
import mne
1718

1819
data_path = mne.datasets.opm.data_path()

examples/datasets/spm_faces_dataset_sgskip.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@
2727
import matplotlib.pyplot as plt
2828

2929
import mne
30+
from mne import combine_evoked, io
3031
from mne.datasets import spm_face
32+
from mne.minimum_norm import apply_inverse, make_inverse_operator
3133
from mne.preprocessing import ICA, create_eog_epochs
32-
from mne import io, combine_evoked
33-
from mne.minimum_norm import make_inverse_operator, apply_inverse
3434

3535
print(__doc__)
3636

examples/decoding/decoding_csp_eeg.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,17 @@
2020
# %%
2121

2222

23-
import numpy as np
2423
import matplotlib.pyplot as plt
25-
26-
from sklearn.pipeline import Pipeline
24+
import numpy as np
2725
from sklearn.discriminant_analysis import LinearDiscriminantAnalysis
2826
from sklearn.model_selection import ShuffleSplit, cross_val_score
27+
from sklearn.pipeline import Pipeline
2928

30-
from mne import Epochs, pick_types, events_from_annotations
29+
from mne import Epochs, events_from_annotations, pick_types
3130
from mne.channels import make_standard_montage
32-
from mne.io import concatenate_raws, read_raw_edf
3331
from mne.datasets import eegbci
3432
from mne.decoding import CSP
33+
from mne.io import concatenate_raws, read_raw_edf
3534

3635
print(__doc__)
3736

examples/decoding/decoding_csp_timefreq.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,19 @@
2121
# %%
2222

2323

24-
import numpy as np
2524
import matplotlib.pyplot as plt
25+
import numpy as np
26+
from sklearn.discriminant_analysis import LinearDiscriminantAnalysis
27+
from sklearn.model_selection import StratifiedKFold, cross_val_score
28+
from sklearn.pipeline import make_pipeline
29+
from sklearn.preprocessing import LabelEncoder
2630

2731
from mne import Epochs, create_info, events_from_annotations
28-
from mne.io import concatenate_raws, read_raw_edf
2932
from mne.datasets import eegbci
3033
from mne.decoding import CSP
34+
from mne.io import concatenate_raws, read_raw_edf
3135
from mne.time_frequency import AverageTFR
3236

33-
from sklearn.discriminant_analysis import LinearDiscriminantAnalysis
34-
from sklearn.model_selection import StratifiedKFold, cross_val_score
35-
from sklearn.pipeline import make_pipeline
36-
from sklearn.preprocessing import LabelEncoder
37-
3837
# %%
3938
# Set parameters and read data
4039
event_id = dict(hands=2, feet=3) # motor imagery: hands vs feet

examples/decoding/decoding_rsa_sgskip.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,21 +29,19 @@
2929

3030
# %%
3131

32+
import matplotlib.pyplot as plt
3233
import numpy as np
3334
from pandas import read_csv
34-
import matplotlib.pyplot as plt
35-
35+
from sklearn.linear_model import LogisticRegression
36+
from sklearn.manifold import MDS
37+
from sklearn.metrics import roc_auc_score
3638
from sklearn.model_selection import StratifiedKFold
3739
from sklearn.pipeline import make_pipeline
3840
from sklearn.preprocessing import StandardScaler
39-
from sklearn.linear_model import LogisticRegression
40-
from sklearn.metrics import roc_auc_score
41-
from sklearn.manifold import MDS
4241

4342
import mne
44-
from mne.io import read_raw_fif, concatenate_raws
4543
from mne.datasets import visual_92_categories
46-
44+
from mne.io import concatenate_raws, read_raw_fif
4745

4846
print(__doc__)
4947

examples/decoding/decoding_spatio_temporal_source.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,16 @@
2121

2222
# %%
2323

24-
import numpy as np
2524
import matplotlib.pyplot as plt
26-
27-
from sklearn.pipeline import make_pipeline
28-
from sklearn.preprocessing import StandardScaler
25+
import numpy as np
2926
from sklearn.feature_selection import SelectKBest, f_classif
3027
from sklearn.linear_model import LogisticRegression
28+
from sklearn.pipeline import make_pipeline
29+
from sklearn.preprocessing import StandardScaler
3130

3231
import mne
32+
from mne.decoding import LinearModel, SlidingEstimator, cross_val_multiscore, get_coef
3333
from mne.minimum_norm import apply_inverse_epochs, read_inverse_operator
34-
from mne.decoding import cross_val_multiscore, LinearModel, SlidingEstimator, get_coef
3534

3635
print(__doc__)
3736

examples/decoding/decoding_spoc_CMC.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,14 @@
2424

2525
# %%
2626
import matplotlib.pyplot as plt
27+
from sklearn.linear_model import Ridge
28+
from sklearn.model_selection import KFold, cross_val_predict
29+
from sklearn.pipeline import make_pipeline
2730

2831
import mne
2932
from mne import Epochs
30-
from mne.decoding import SPoC
3133
from mne.datasets.fieldtrip_cmc import data_path
32-
33-
from sklearn.pipeline import make_pipeline
34-
from sklearn.linear_model import Ridge
35-
from sklearn.model_selection import KFold, cross_val_predict
34+
from mne.decoding import SPoC
3635

3736
# Define parameters
3837
fname = data_path() / "SubjectCMC.ds"

examples/decoding/decoding_time_generalization_conditions.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,9 @@
2020
# %%
2121

2222
import matplotlib.pyplot as plt
23-
23+
from sklearn.linear_model import LogisticRegression
2424
from sklearn.pipeline import make_pipeline
2525
from sklearn.preprocessing import StandardScaler
26-
from sklearn.linear_model import LogisticRegression
2726

2827
import mne
2928
from mne.datasets import sample

0 commit comments

Comments
 (0)