From 91643b42d26f3297ff593073e228f6813e61d05b Mon Sep 17 00:00:00 2001 From: Marijn van Vliet Date: Tue, 19 Apr 2022 14:43:47 +0300 Subject: [PATCH] Fix test for volume source spaces with restricted orientations --- mne/minimum_norm/inverse.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mne/minimum_norm/inverse.py b/mne/minimum_norm/inverse.py index 7f2fc3b9e9d..6f755ac82dc 100644 --- a/mne/minimum_norm/inverse.py +++ b/mne/minimum_norm/inverse.py @@ -1407,7 +1407,7 @@ def _prepare_forward(forward, info, noise_cov, fixed, loose, rank, pca, raise ValueError('Computing inverse solutions for volume source ' 'spaces with fixed orientations is not ' 'supported.') - if 'volume' in loose and any(v < 1 for v in loose.values()): + if 0 < loose.get('volume', 1) < 1: raise ValueError('Computing inverse solutions with restricted ' 'orientations (loose < 1) is not supported for ' 'volume source spaces.')