fixed failing doctest
authorBertrand Thirion <bertrand.thirion@inria.fr>
Sat, 4 Nov 2017 03:07:42 +0000 (03:07 +0000)
committerPeter Michael Green <plugwash@raspbian.org>
Sat, 4 Nov 2017 03:07:42 +0000 (03:07 +0000)
Gbp-Pq: Name changeset_32cb61eab2e92525c2497294d3be40e361507c4e.diff

nipy/algorithms/statistics/mixed_effects_stat.py

index a044eb2a71a6c6f21e4796d0a13be3520fd383a9..500b5a2435479ed4cb728ccc0ff5977046ebaf13 100644 (file)
@@ -12,12 +12,11 @@ Author: Bertrand Thirion, 2012.
 
 >>> N, P = 15, 500
 >>> V1 = np.random.randn(N, P) ** 2
->>> effects = np.random.randn(P) > 0
+>>> effects = np.ones(P)
 >>> Y = generate_data(np.ones(N), effects, .25, V1)
 >>> T1 = one_sample_ttest(Y, V1, n_iter=5)
->>> T1 = [T1[effects == x] for x  in np.unique(effects)]
->>> T2 = [t_stat(Y)[effects == x] for x  in np.unique(effects)]
->>> assert np.array([t1.std() < t2.std() for t1, t2 in zip(T1, T2)]).all()
+>>> T2 = t_stat(Y)
+>>> assert(T1.std() < T2.std())
 """
 from __future__ import absolute_import
 from __future__ import print_function