From: Bertrand Thirion Date: Sun, 4 Sep 2016 14:18:55 +0000 (+0100) Subject: fixed failing doctest X-Git-Tag: archive/raspbian/0.4.1-1+rpi1~1^2~2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=6eb1dc7d6e684ad11b735153c564055227d533a5;p=nipy.git fixed failing doctest Gbp-Pq: Name changeset_32cb61eab2e92525c2497294d3be40e361507c4e.diff --- diff --git a/nipy/algorithms/statistics/mixed_effects_stat.py b/nipy/algorithms/statistics/mixed_effects_stat.py index a044eb2..500b5a2 100644 --- a/nipy/algorithms/statistics/mixed_effects_stat.py +++ b/nipy/algorithms/statistics/mixed_effects_stat.py @@ -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