[Numpy-discussion] fftshift

Pearu Peterson pearu at cens.ioc.ee
Thu May 29 13:48:02 EDT 2003

On Thu, 29 May 2003, Cliff Martin wrote:

> This leads me to my second problem.  In Matlab there is a function 
> called fftshift that lets one shift the fft values for more easy 
> visualization.  Numeric doesn't seem to have a function like that 
> explicitly although I suppose one could use the flip function in the 
> MatPy module.  Has anyone implemented something like the fftshift 
> function or could you suggest the best way to do this?  Thanks for your 
> help.  Oh I'm doing this on a 2D array.

scipy.fftpack has fftshift. If you don't care building scipy
yourself then the implementation of fftshift can be viewed via
CVSview at www.scipy.org, look at the file


More information about the NumPy-Discussion mailing list