Did I find the right examples for you? yes no      Crawl my project      Python Jobs

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

src/n/i/nipy-0.3.0/nipy/core/image/tests/test_image.py   nipy(Download)
from .. import image
from ..image import Image, iter_axis, is_image, rollimg
from ...api import parcels, data_generator, write_data
from ...reference.coordinate_system import CoordinateSystem
from ...reference.coordinate_map import AffineTransform, AxisError
def test_parcels1():
    parcelmap = gimg.get_data().astype(np.int32)
    test = np.zeros(parcelmap.shape)
    v = 0
    for i, d in data_generator(test, parcels(parcelmap)):
    test = np.zeros(rho.shape)
    v = 0
    for i, d in data_generator(test, parcels(parcelmap, labels=labels)):
        v += d.shape[0]
    yield assert_equal, v, np.product(test.shape)