Skip to content

Commit 6011f58

Browse files
committed
short-circuit corrmap when appropriate
1 parent 963cfe1 commit 6011f58

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

mne/preprocessing/ica.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2831,6 +2831,11 @@ def corrmap(icas, template, threshold="auto", label=None, ch_type="eeg", *,
28312831
"montage. Consider interpolating bad channels before "
28322832
"running ICA.")
28332833

2834+
if label is None and not plot:
2835+
warn('Nothing to do: when label=None and plot=False, corrmap() '
2836+
'returns None and the inputs are unchanged.', UserWarning)
2837+
return
2838+
28342839
threshold_extra = ''
28352840
if threshold == 'auto':
28362841
threshold = np.arange(60, 95, dtype=np.float64) / 100.

0 commit comments

Comments
 (0)