Best way for rotating a matrix of data?

Raphaël Plasson rplasson at
Fri Sep 24 02:50:01 CEST 2010

On Sep 23, 1:50 am, Nobody <nob... at> wrote:

> You can use arrays as indices, so applying a transformation to a set of
> index arrays (e.g. np.indices) then using those as indices is equivalent
> to applying a spatial transform to the data.

I am not sure that this would do the trick, e.g. for extracting a
transversal slice of a 3D array.

> Also: scipy.ndimage.

But this seems to do exactly what I am looking for, thanks :). There
actually may be another solution, that is to use the VTK library.
However, it is a much more complex package, much more powerful but
maybe too much for what I want to do. The scipy.ndimage module ("Multi-
dimensional image processing") is probably the best solution for me.

Thank you,


More information about the Python-list mailing list