From: Bertrand Thirion Date: Sat, 4 Nov 2017 03:07:42 +0000 (+0000) Subject: fixed failing doctest X-Git-Tag: archive/raspbian/0.4.1-1+rpi1~3 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=951fdd63eac196485a8a7a954e968a68529014e8;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