Did I find the right examples for you? yes no

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

src/p/y/pypreprocess-HEAD/pypreprocess/external/nipy_labs/datasets/volumes/tests/test_volume_img.py   pypreprocess(Download)
        orig_img = copy.copy(img)
        x, y, z = img.get_world_coords() 
        sample = img.values_in_world(x, y, z)
        img2 = img.xyz_ordered()
        # Check that img has not been changed
        yield np.testing.assert_array_equal, np.unique(y), np.unique(y_)
        yield np.testing.assert_array_equal, np.unique(z), np.unique(z_)
        sample2 = img.values_in_world(x, y, z)
        yield np.testing.assert_array_equal, sample, sample2
 
    ref_im = VolumeImg(data, affine, 'mine')
    x, y, z = np.indices(ref_im.get_data().shape[:3])
    values = ref_im.values_in_world(x, y, z)
    np.testing.assert_almost_equal(values, data)
 
 
        x, y, z = N*np.random.random(size=(3, 10))
        yield np.testing.assert_almost_equal, img1.values_in_world(x, y, z), \
            img2.values_in_world(x, y, z)
 

src/n/i/nipy-0.3.0/nipy/labs/datasets/volumes/tests/test_volume_img.py   nipy(Download)
        orig_img = copy.copy(img)
        x, y, z = img.get_world_coords() 
        sample = img.values_in_world(x, y, z)
        img2 = img.xyz_ordered()
        # Check that img has not been changed
        yield np.testing.assert_array_equal, np.unique(y), np.unique(y_)
        yield np.testing.assert_array_equal, np.unique(z), np.unique(z_)
        sample2 = img.values_in_world(x, y, z)
        yield np.testing.assert_array_equal, sample, sample2
 
    ref_im = VolumeImg(data, affine, 'mine')
    x, y, z = np.indices(ref_im.get_data().shape[:3])
    values = ref_im.values_in_world(x, y, z)
    np.testing.assert_almost_equal(values, data)
 
 
        x, y, z = N*np.random.random(size=(3, 10))
        yield np.testing.assert_almost_equal, img1.values_in_world(x, y, z), \
            img2.values_in_world(x, y, z)