[Numpy-discussion] FFT of 2D array along last axis

Stefan van der Walt stefan at sun.ac.za
Thu Nov 6 18:28:16 EST 2014


Hi Brad

On 2014-11-07 00:51:02, Brad Buran <bburan at alum.mit.edu> wrote:
> On Windows 7 using Anaconda with numpy 1.9.1 I get False (indicating that
> the FFT is not treating each row separately).  When I test on a Ubuntu box
> using numpy 1.9.1 I get True.  Is this expected behavior?  If I understand
> the documentation correctly, the FFT on each row should be independent
> (i.e. the result should not be influenced by the other rows).

The results should be the same.  As an additional test, can you check:

np.testing.assert_array_almost_equal(np.fft.fft(z, axis=-1)[0], np.fft.fft(z[0]))

Thanks
Stéfan



More information about the NumPy-Discussion mailing list