Did I find the right examples for you? yes no

All Samples(6)  |  Call(6)  |  Derive(0)  |  Import(0)

src/n/i/nipy-0.3.0/nipy/labs/spatial_models/hierarchical_parcellation.py   nipy(Download)
                                   template_labels=template_labels,
                                   nb_parcel=nb_parcel)
    pcl.make_feature('functional', np.rollaxis(np.array(ldata), 1, 0))
 
    if nb_perm > 0:
        pcl = MultiSubjectParcellation(domain, individual_labels=labels,
                                       template_labels=template_labels)
        pdata = pcl.make_feature('functional',
                                 np.rollaxis(np.array(ldata), 1, 0))
        prfx = ttest(np.squeeze(pdata))

src/n/i/nipy-0.3.0/nipy/labs/spatial_models/tests/test_parcel.py   nipy(Download)
    #instantiate a parcellation
    msp = MultiSubjectParcellation(domain, u, u)
    msp.make_feature('data', data)
    assert msp.get_feature('data').shape == (nb_parcel, 1)
 
    # test a multi_dimensional feature
    dim = 4
    msp.make_feature('new', np.random.randn(np.prod(shape), 1, dim))
    assert msp.get_feature('new').shape == (nb_parcel, 1, dim)
 
    # test a multi_dimensional feature
    # dimension 1
    msp.make_feature('data', np.random.randn(np.prod(shape), nb_subj))
    assert msp.get_feature('data').shape == (nb_parcel, nb_subj)
 
    #dimension>1
    dim = 4
    msp.make_feature('data', np.random.randn(np.prod(shape), nb_subj, dim))