Skip to content
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
1 change: 1 addition & 0 deletions doc/changes/devel/12829.apichange.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Deprecate ``average`` parameter in ``plot_filters`` and ``plot_patterns`` methods of the :class:`mne.decoding.CSP` and :class:`mne.decoding.SPoC` classes, by `Thomas Binns`_.
7 changes: 7 additions & 0 deletions mne/decoding/csp.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
copy_doc,
fill_doc,
pinv,
warn,
)
from .base import BaseEstimator
from .mixin import TransformerMixin
Expand Down Expand Up @@ -369,6 +370,9 @@ def plot_patterns(
if components is None:
components = np.arange(self.n_components)

if average is not None:
warn("`average` is deprecated and will be removed in 1.10.", FutureWarning)

# set sampling frequency to have 1 component per time point
info = cp.deepcopy(info)
with info._unlock():
Expand Down Expand Up @@ -500,6 +504,9 @@ def plot_filters(
if components is None:
components = np.arange(self.n_components)

if average is not None:
warn("`average` is deprecated and will be removed in 1.10.", FutureWarning)

# set sampling frequency to have 1 component per time point
info = cp.deepcopy(info)
with info._unlock():
Expand Down