pythonnumpyfftifft

Inverse discrete Fourier transform of across specified dimension in Python/Numpy


In Matlab, ifft(X,[],2) (link to documentation) computes the inverse discrete Fourier transform of X across the dimension 2.

Is there a way to accomplish this with numpy.fft.ifft (link to documentation)?


Solution

  • Presumably you want

    np.fft.ifft(x, axis=1)
    

    In numpy, dimensions are commonly referred to as "axes", and the second dimension is axis 1 (since Python indexing starts at 0 rather than 1).