[med-svn] [python-mne] 82/353: FIX: use float64 for sing. val in inverse to prevent underflow in square
Yaroslav Halchenko
debian at onerussian.com
Fri Nov 27 17:24:34 UTC 2015
This is an automated email from the git hooks/post-receive script.
yoh pushed a commit to tag 0.4
in repository python-mne.
commit cbd49da8c75a9e86c40b005e13e8ce1a71f18171
Author: Martin Luessi <mluessi at nmr.mgh.harvard.edu>
Date: Sat Feb 25 14:09:58 2012 -0500
FIX: use float64 for sing. val in inverse to prevent underflow in square
---
mne/minimum_norm/inverse.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/mne/minimum_norm/inverse.py b/mne/minimum_norm/inverse.py
index 90eb195..2338301 100644
--- a/mne/minimum_norm/inverse.py
+++ b/mne/minimum_norm/inverse.py
@@ -350,7 +350,8 @@ def prepare_inverse_operator(orig, nave, lambda2, dSPM):
#
# Create the diagonal matrix for computing the regularized inverse
#
- inv['reginv'] = inv['sing'] / (inv['sing'] ** 2 + lambda2)
+ sing = np.array(inv['sing'], dtype=np.float64)
+ inv['reginv'] = sing / (sing ** 2 + lambda2)
print ' Created the regularized inverter'
#
# Create the projection operator
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/python-mne.git
More information about the debian-med-commit
mailing list