Did I find the right examples for you? yes no

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

src/n/i/nipy-0.3.0/nipy/algorithms/utils/pca.py   nipy(Download)
 
from ...core.image.image import rollimg
from ...core.reference.coordinate_map import (io_axis_indices, orth_axes,
                                              drop_io_dim, AxisError)
 
    work_img = rollimg(img, axis)
    if mask is not None:
        if not mask.coordmap.similar_to(drop_io_dim(img.coordmap, axis)):
            raise ValueError("Mask should have matching coordmap to `img` "
                             "coordmap with dropped axis %s" % axis)

src/n/i/nipy-0.3.0/nipy/algorithms/utils/tests/test_pca_image.py   nipy(Download)
from ..pca import pca_image, pca as pca_array
from ....core.api import Image, AffineTransform, CoordinateSystem as CS
from ....core.reference.coordinate_map import (product as cm_product,
                                               drop_io_dim, AxisError)
from ....core.image.image import rollimg
    # as a mask
    img_data = t0_img.get_data()
    mask_cmap = drop_io_dim(img.coordmap, 't')
    first_frame = img_data[0]
    mask = Image(np.greater(first_frame, 500).astype(np.float64),