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 de089113dcace32521d4c26c854dc234b191340d Author: Martin Luessi <[email protected]> Date: Mon Jul 30 16:10:44 2012 -0400 FIX: don't use index() in loop --- mne/cov.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mne/cov.py b/mne/cov.py index a368a8c..518a403 100644 --- a/mne/cov.py +++ b/mne/cov.py @@ -491,13 +491,13 @@ def regularize(cov, info, mag=0.1, grad=0.1, eeg=0.1, exclude=None, ch_names = cov.ch_names idx_eeg, idx_mag, idx_grad = [], [], [] - for ch in ch_names: + for i, ch in enumerate(ch_names): if ch in ch_names_eeg: - idx_eeg.append(ch_names.index(ch)) + idx_eeg.append(i) elif ch in ch_names_mag: - idx_mag.append(ch_names.index(ch)) + idx_mag.append(i) elif ch in ch_names_grad: - idx_grad.append(ch_names.index(ch)) + idx_grad.append(i) else: raise Exception('channel is unknown type') -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/python-mne.git _______________________________________________ debian-med-commit mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
