Open
Description
Description of the problem
The API doc Shows that the default value for parameter exclude
is 'bads'
, but in the description for that parameter, it says that the default is None
, when In fact, None
is not even a valid argument for this parameter:
exclude : None | list of str | 'bads' Channels names to exclude from being shown. If ``'bads'``, the bad channels are excluded. Defaults to ``None``.
Steps to reproduce
sample_fpath = mne.datasets.sample.data_path()
fpath = sample_fpath / "MEG" / "sample" / "sample_audvis_raw.fif"
raw = mne.io.read_raw(fpath, preload=True).pick("eeg")
epochs = mne.make_fixed_length_epochs(raw, duration=1, preload=True)
evoked = epochs.average()
evoked.plot_joint(exclude=None) # include/exclude must be list, tuple, ndarray, or "bads". You provided type <class 'NoneType'>.
Expected results
Figure shows with no bad channels excluded.
Actual results
ValueError: include/exclude must be list, tuple, ndarray, or "bads". You provided type <class 'NoneType'>.
Additional information
Should the code be fixed to match the docstring (i.e. accept None
, and make it the default), or should the mention of None
simply by removed from the docstring?