Did I find the right examples for you? yes no

All Samples(2)  |  Call(1)  |  Derive(0)  |  Import(1)

src/n/i/nipy-0.3.0/nipy/labs/spatial_models/tests/test_discrete_domain.py   nipy(Download)
import numpy as np
from numpy.testing import assert_almost_equal, assert_equal
from ..discrete_domain import smatrix_from_nd_idx, smatrix_from_3d_array, \
    smatrix_from_nd_array, domain_from_binary_array, domain_from_image, \
    domain_from_mesh, grid_domain_from_binary_array, grid_domain_from_image, \
    darrays = [nbg.GiftiDataArray(coords)] + [nbg.GiftiDataArray(triangles)]
    toy_image = nbg.GiftiImage(darrays=darrays)
    domain = domain_from_mesh(toy_image)
    # if we get there, we could build the domain, and that's what we wanted.
    assert_equal(domain.get_coord(), coords)