Source

pypy / site-packages / numpy / fft / test / test_fftpack.py

Full commit
#!/usr/bin/env python

try:
    import numpypy 
except ImportError:
    pass
import numpy

from numpy.fft import fftpack
from test_helpers import fft_slow, assert_array_almost_equal

# Test FFTs through the numpy interface

a   = np.array([85.0, 76.0, 42.0, 26.0, 51.0, 40.0, 79.0, 30.0], dtype='f8')
f_a = fft(a)
assert_array_almost_equal(f_a, fft_slow(a))

print f_a
i_a = ifft(f_a)
print i_a
assert_array_almost_equal(ifft(f_a), a)

a = np.array([1+1j, 2+2j, 3-2j, 4+1j])
assert_array_almost_equal(fft(a), fft_slow(a))