bfletch
bfletch

Reputation: 411

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)?

Upvotes: 0

Views: 538

Answers (1)

ali_m
ali_m

Reputation: 74154

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).

Upvotes: 1

Related Questions