Did I find the right examples for you? yes no

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

src/n/i/nipy-0.3.0/nipy/algorithms/utils/pca.py   nipy(Download)
import scipy.linalg as spl
from ...core.image.image import rollimg
from ...core.reference.coordinate_map import (io_axis_indices, orth_axes,
                                              drop_io_dim, AxisError)
                        'to rest of affine' % axis)
    # Roll the chosen axis to input position zero
    work_img = rollimg(img, axis)
    if mask is not None:
        if not mask.coordmap.similar_to(drop_io_dim(img.coordmap, axis)):
    output_img = img_klass(res['basis_projections'], output_coordmap)
    # We have to roll the axis back to the original position
    output_img = rollimg(output_img, 0, in_ax + 1)
    key = 'basis_vectors over %s' % axis
    res[key] = res['basis_vectors']

src/n/i/nipy-0.3.0/nipy/algorithms/utils/tests/test_pca_image.py   nipy(Download)
from ....core.reference.coordinate_map import (product as cm_product,
                                               drop_io_dim, AxisError)
from ....core.image.image import rollimg
from ....io.api import  load_image
def setup():
    img = load_image(funcfile)
    # Here, I'm just doing this so I know that img.shape[0] is the number of
    # volumes
    t0_img = rollimg(img, 't')