Skip to content

Commit 70d3895

Browse files
fix completely dry runs in case (no dict creation)
1 parent 1366dcb commit 70d3895

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mne/preprocessing/ica.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2433,9 +2433,9 @@ def corrmap(icas, template, threshold="auto", label=None,
24332433
subjs.extend([ii] * len(max_corr))
24342434
indices.extend(max_corr)
24352435
else:
2436-
if label not in ica.labels_.keys():
2437-
ica.labels_[label] = []
2438-
nones.append(ii)
2436+
if (label is not None) and (label not in ica.labels_.keys()):
2437+
ica.labels_[label] = list()
2438+
nones.append(ii)
24392439

24402440
if len(nones) == 0:
24412441
logger.info('At least 1 IC detected for each subject.')

0 commit comments

Comments
 (0)