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 68acde5a1607faef059f8df33be15ca9d0a1d075 Author: [email protected] <[email protected]> Date: Sun Jun 24 05:08:08 2012 -0400 FIX: do not use parallel if n_jobs==1 --- mne/time_frequency/tfr.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/mne/time_frequency/tfr.py b/mne/time_frequency/tfr.py index 8eee48f..94df8b1 100644 --- a/mne/time_frequency/tfr.py +++ b/mne/time_frequency/tfr.py @@ -337,9 +337,7 @@ def induced_power(epochs, Fs, frequencies, use_fft=True, n_cycles=7, # Precompute wavelets for given frequency range to save time Ws = morlet(Fs, frequencies, n_cycles=n_cycles) - parallel, my_time_frequency, _ = parallel_func(_time_frequency, n_jobs) - - if my_time_frequency is _time_frequency: # not parallel + if n_jobs == 1: psd = np.empty((n_channels, n_frequencies, n_times)) plf = np.empty((n_channels, n_frequencies, n_times), dtype=np.complex) @@ -347,8 +345,9 @@ def induced_power(epochs, Fs, frequencies, use_fft=True, n_cycles=7, X = np.squeeze(epochs[:, c, :]) this_psd, this_plf = _time_frequency(X, Ws, use_fft) psd[c], plf[c] = this_psd[:, ::decim], this_plf[:, ::decim] - else: + parallel, my_time_frequency, _ = parallel_func(_time_frequency, n_jobs) + psd_plf = parallel(my_time_frequency(np.squeeze(epochs[:, c, :]), Ws, use_fft) for c in range(n_channels)) -- 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
