[SciPy-user] FFT2d

Robert Kern robert.kern at gmail.com
Mon Jun 19 10:01:56 CDT 2006

Jean-Francois Moulin wrote:
> Hi!
> I need to perform some 2d fft analysis and I got some problem...
> If I understood well fft2d is not yet implemented in numpy... I
> installed Numeric and do:
> import FFT
> f=fft2d(foo)
> and got the message "fft2d is not defined"

That should be FFT.fft2d(foo) (supposing you also actually had foo defined;
please copy-and-paste small examples with the exact error messages they produce
rather than retyping).

However, numpy has 2D FFTs:

In [1]: from numpy import dft

In [2]: dft.fft2?
Type:           function
Base Class:     <type 'function'>
String Form:    <function fft2 at 0x6d72b0>
Namespace:      Interactive
Definition:     dft.fft2(a, s=None, axes=(-2, -1))
    fft2(a, s=None, axes=(-2,-1))

    The 2d fft of a. This is really just fftnd with different default

Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
  -- Umberto Eco

More information about the SciPy-user mailing list