We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2d99a20 + 7c25b3f commit 8645f34Copy full SHA for 8645f34
src/rsatoolbox/rdm/calc.py
@@ -521,12 +521,12 @@ def _check_noise(noise, n_channel):
521
pass
522
elif isinstance(noise, np.ndarray) and noise.ndim == 2:
523
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)
527
elif isinstance(noise, dict):
528
for key in noise.keys():
529
noise[key] = _check_noise(noise[key], n_channel)
+ elif isinstance(noise, Iterable):
+ for idx, noise_i in enumerate(noise):
+ noise[idx] = _check_noise(noise_i, n_channel)
530
else:
531
raise ValueError('noise(s) must have shape n_channel x n_channel')
532
return noise
0 commit comments