[med-svn] [python-mne] 303/376: FIX : misuse of is to compare strings

Yaroslav Halchenko debian at onerussian.com
Fri Nov 27 17:23:10 UTC 2015


This is an automated email from the git hooks/post-receive script.

yoh pushed a commit to annotated tag v0.1
in repository python-mne.

commit 5e61e348a1b1bdc561d1b720d79e864fdd3aacf0
Author: Alexandre Gramfort <alexandre.gramfort at inria.fr>
Date:   Sat Jun 18 11:40:12 2011 -0400

    FIX : misuse of is to compare strings
---
 mne/minimum_norm/inverse.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/mne/minimum_norm/inverse.py b/mne/minimum_norm/inverse.py
index 926aa04..174ac49 100644
--- a/mne/minimum_norm/inverse.py
+++ b/mne/minimum_norm/inverse.py
@@ -802,7 +802,7 @@ def minimum_norm(evoked, forward, whitener, method='dspm',
         w = w ** weight_exp
 
     # apply loose orientations
-    if orientation is 'loose':
+    if orientation == 'loose':
         print 'Applying loose dipole orientations. Loose value of %s.' % loose
         w[itangential] *= loose
 
@@ -828,7 +828,7 @@ def minimum_norm(evoked, forward, whitener, method='dspm',
     Kernel = source_std[:, None] * np.dot(Vh.T, ss[:, None] * U.T)
 
     # Compute dSPM operator.
-    if method is 'dspm':
+    if method == 'dspm':
         print 'Computing dSPM inverse operator.'
         dspm_diag = np.sum(Kernel ** 2, axis=1)
         if n_dip_per_pos == 1:
@@ -842,7 +842,7 @@ def minimum_norm(evoked, forward, whitener, method='dspm',
         Kernel /= dspm_diag[:, None]
 
     # whitened sLORETA imaging kernel
-    elif method is 'sloreta':
+    elif method == 'sloreta':
         print 'Computing sLORETA inverse operator.'
         if n_dip_per_pos == 1:
             sloreta_diag = np.sqrt(np.sum(Kernel * gain.T, axis=1))

-- 
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