Did I find the right examples for you? yes no

All Samples(16)  |  Call(14)  |  Derive(0)  |  Import(2)

src/p/y/pypreprocess-HEAD/pypreprocess/external/nipy_labs/utils/tests/test_simul_multisubject_fmri_dataset.py   pypreprocess(Download)
from nibabel import Nifti1Image
 
from ..simul_multisubject_fmri_dataset import \
    surrogate_2d_dataset, surrogate_3d_dataset, surrogate_4d_dataset 
 
    shape = (5, 6, 7)
    out_shape = shape + (1,)
    imgs = surrogate_4d_dataset(shape)
    assert_true(not np.any(np.asarray(imgs[0].shape) - np.asarray(out_shape)))
    n_sess = 3
    imgs = surrogate_4d_dataset(shape, n_sess=n_sess)
    n_scans = 5
    out_shape = shape + (n_scans,)
    imgs = surrogate_4d_dataset(shape, n_scans=n_scans)
    assert_true(imgs[0].shape == (out_shape))
 
                   for i in range(n_sess)]
    shape = (5, 6, 7)
    imgs = surrogate_4d_dataset(shape, out_image_file=write_paths[0])
    assert_true(path.isfile(write_paths[0]))
    imgs = surrogate_4d_dataset(shape, n_sess=n_sess, 

src/n/i/nipy-0.3.0/nipy/labs/utils/tests/test_simul_multisubject_fmri_dataset.py   nipy(Download)
from nibabel import Nifti1Image
 
from ..simul_multisubject_fmri_dataset import \
    surrogate_2d_dataset, surrogate_3d_dataset, surrogate_4d_dataset 
 
    shape = (5, 6, 7)
    out_shape = shape + (1,)
    imgs = surrogate_4d_dataset(shape)
    assert_true(not np.any(np.asarray(imgs[0].shape) - np.asarray(out_shape)))
    n_sess = 3
    imgs = surrogate_4d_dataset(shape, n_sess=n_sess)
    n_scans = 5
    out_shape = shape + (n_scans,)
    imgs = surrogate_4d_dataset(shape, n_scans=n_scans)
    assert_true(imgs[0].shape == (out_shape))
 
                   for i in range(n_sess)]
    shape = (5, 6, 7)
    imgs = surrogate_4d_dataset(shape, out_image_file=write_paths[0])
    assert_true(path.isfile(write_paths[0]))
    imgs = surrogate_4d_dataset(shape, n_sess=n_sess,