Skip to content

Commit 8645f34

Browse files
Merge pull request #369 from rsagroup/HeikoSchuett-patch-1
Changing check order in _check_noise
2 parents 2d99a20 + 7c25b3f commit 8645f34

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/rsatoolbox/rdm/calc.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -521,12 +521,12 @@ def _check_noise(noise, n_channel):
521521
pass
522522
elif isinstance(noise, np.ndarray) and noise.ndim == 2:
523523
assert np.all(noise.shape == (n_channel, n_channel))
524-
elif isinstance(noise, Iterable):
525-
for idx, noise_i in enumerate(noise):
526-
noise[idx] = _check_noise(noise_i, n_channel)
527524
elif isinstance(noise, dict):
528525
for key in noise.keys():
529526
noise[key] = _check_noise(noise[key], n_channel)
527+
elif isinstance(noise, Iterable):
528+
for idx, noise_i in enumerate(noise):
529+
noise[idx] = _check_noise(noise_i, n_channel)
530530
else:
531531
raise ValueError('noise(s) must have shape n_channel x n_channel')
532532
return noise

0 commit comments

Comments
 (0)