[med-svn] [python-mne] 294/353: fixed idx in test_bootstrap

Yaroslav Halchenko debian at onerussian.com
Fri Nov 27 17:25:18 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 8ba89d5d87a80788ada8a5364c8e25a5e601fc11
Author: Daniel Strohmeier <daniel.strohmeier at googlemail.com>
Date:   Wed Jul 18 16:05:32 2012 +0200

    fixed idx in test_bootstrap
---
 mne/epochs.py            | 2 +-
 mne/tests/test_epochs.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/mne/epochs.py b/mne/epochs.py
index dc6662f..fdc723d 100644
--- a/mne/epochs.py
+++ b/mne/epochs.py
@@ -540,7 +540,7 @@ def bootstrap(epochs, rng, return_idx=False):
     n_events = len(epochs_bootstrap.events)
     idx = rng.randint(0, n_events, n_events)
     epochs_bootstrap = epochs_bootstrap[idx]
-    if output_idx:
+    if return_idx:
         return epochs_bootstrap, idx
     else:
         return epochs_bootstrap
diff --git a/mne/tests/test_epochs.py b/mne/tests/test_epochs.py
index d2eb23c..c751db3 100644
--- a/mne/tests/test_epochs.py
+++ b/mne/tests/test_epochs.py
@@ -202,6 +202,6 @@ def test_bootstrap():
                     reject=reject, flat=flat)
     data_normal = epochs._data
     rng = np.random.RandomState(0)
-    epochs2, idx = bootstrap(epochs, rng)
+    epochs2, idx = bootstrap(epochs, rng, return_idx=True)
     n_events = len(epochs.events)
     assert_array_equal(epochs2._data, data_normal[idx])

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