Did I find the right examples for you? yes no

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

src/n/i/nipy-0.3.0/nipy/labs/spatial_models/hierarchical_parcellation.py   nipy(Download)
 
from nipy.algorithms.clustering.utils import kmeans, voronoi
from .parcellation import MultiSubjectParcellation
from nipy.algorithms.graph.field import Field
from nipy.algorithms.graph.graph import wgraph_from_coo_matrix
 
    # create the parcellation
    pcl = MultiSubjectParcellation(domain, individual_labels=labels,
                                   template_labels=template_labels,
                                   nb_parcel=nb_parcel)
 
        # create the parcellation
        pcl = MultiSubjectParcellation(domain, individual_labels=labels,
                                       template_labels=template_labels)
        pdata = pcl.make_feature('functional',

src/n/i/nipy-0.3.0/nipy/labs/spatial_models/tests/test_parcel.py   nipy(Download)
from ..hierarchical_parcellation import hparcel
from ...utils.simul_multisubject_fmri_dataset import surrogate_2d_dataset
from ..parcellation import MultiSubjectParcellation
from ..discrete_domain import grid_domain_from_binary_array
 
 
    #instantiate a parcellation
    msp = MultiSubjectParcellation(domain, u, u)
    assert msp.nb_parcel == nb_parcel
    assert msp.nb_subj == 1
 
    #instantiate a parcellation
    msp = MultiSubjectParcellation(domain, u, v)
    assert msp.nb_parcel == nb_parcel
    assert msp.nb_subj == nb_subj
 
    #instantiate a parcellation
    msp = MultiSubjectParcellation(domain, u, u)
    msp.make_feature('data', data)
    assert msp.get_feature('data').shape == (nb_parcel, 1)
 
    v = np.array(v).T
    msp = MultiSubjectParcellation(domain, u, v)
 
    # test a multi_dimensional feature