Did I find the right examples for you? yes no

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

src/n/i/nipy-0.3.0/examples/algorithms/clustering_comparisons.py   nipy(Download)
xyz = np.reshape(np.indices((dx, dy, dz)), (3, dx * dy * dz)).T.astype(np.int)
F.from_3d_grid(xyz, 6)
F.set_field(data)
 
seeds = np.argsort(nr.rand(F.V))[:nbseeds]

src/n/i/nipy-0.3.0/examples/labs/need_data/demo_ward_clustering.py   nipy(Download)
image_field = Field(nvox)
image_field.from_3d_grid(ijk, k=6)
image_field.set_field(data)
u, _ = image_field.ward(100)
 

src/n/i/nipy-0.3.0/nipy/labs/spatial_models/hierarchical_parcellation.py   nipy(Download)
    # group-level part
    spatial_proto = Field(nb_parcel)
    spatial_proto.set_field(proto_anat)
    spatial_proto.voronoi_diagram(proto_anat, domain.coord)
    spatial_proto.set_gaussian(proto_anat)
 
        # recompute the topological model
        spatial_proto.set_field(proto_anat)
        spatial_proto.voronoi_diagram(proto_anat, domain.coord)
        spatial_proto.set_gaussian(proto_anat)