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/volume_img.py   pypreprocess(Download)
        if affine is None:
            affine = self.affine
        data = self.get_data()
        if shape is None:
            shape = data.shape[:3]
            raise ValueError('Can swap axis only on spatial axis. '
                             'Use np.swapaxes of the data array.')
        reordered_data = np.swapaxes(self.get_data(), axis1, axis2)
        new_affine = self.affine
        order = np.array((0, 1, 2, 3))
                                     interpolation=self.interpolation)
        else:
            new_img = VolumeGrid(self.get_data(),
                                transform=new_v2w_transform,
                                metadata=self.metadata,
    def __eq__(self, other):
        return (    isinstance(other, self.__class__)
                and np.all(self.get_data() == other.get_data())
                and np.all(self.affine == other.affine)
                and (self.world_space == other.world_space)

src/n/i/nipy-0.3.0/nipy/labs/datasets/volumes/volume_img.py   nipy(Download)
        if affine is None:
            affine = self.affine
        data = self.get_data()
        if shape is None:
            shape = data.shape[:3]
            raise ValueError('Can swap axis only on spatial axis. '
                             'Use np.swapaxes of the data array.')
        reordered_data = np.swapaxes(self.get_data(), axis1, axis2)
        new_affine = self.affine
        order = np.array((0, 1, 2, 3))
                                     interpolation=self.interpolation)
        else:
            new_img = VolumeGrid(self.get_data(),
                                transform=new_v2w_transform,
                                metadata=self.metadata,
    def __eq__(self, other):
        return (    isinstance(other, self.__class__)
                and np.all(self.get_data() == other.get_data())
                and np.all(self.affine == other.affine)
                and (self.world_space == other.world_space)