2013-04-10 21:29:02 -07:00
|
|
|
>>> from numpy.fft import fft
|
|
|
|
|
>>> from numpy import array
|
2015-02-20 00:35:01 -05:00
|
|
|
>>> a = array([1.0, 1.0, 1.0, 1.0, 0.0, 0.0, 0.0, 0.0])
|
2013-04-10 21:29:02 -07:00
|
|
|
>>> print( ' '.join("%5.3f" % abs(f) for f in fft(a)) )
|
2015-02-20 00:35:01 -05:00
|
|
|
4.000 2.613 0.000 1.082 0.000 1.082 0.000 2.613
|