Description
For numpy.fft.fftn
and numpy.fft.ifftn
, individual FFTs over axes
are performed in reverse order.
Similarly, for numpy.fft.rfftn
, individual FFTs are performed in reverse order.
However, for numpy.fft.irfftn
individual FFTs are performed in forward order.
Currently we compute complex-to-complex FFT for axes[0], axes[1], .. axes[-2]
and then one final complex-to-real FFT for axes[-1]
.
Should it be changed to complex-to-complex FFT for axes[-2], axes[-3], .. axes[0]
and one final complex-to-real FFT for axes[-1]
(still keeping the complex-to-real FFT over last axis)?
In general, order is not important when calculating complex-to-complex FFTs. However, when we pass s
and axes
parameters (with repeated indices in axes
), order can affect the final shape of the array.