[Numpy-discussion] (no subject)

Carl Canuck carl.canuck.official at gmail.com
Tue Sep 3 20:12:31 EDT 2013


Hello,

I'm new to numpy, and I'm a stuck on my first real project with it.

I am trying to take the rfft of a numpy array, like this:
>>> my_rfft = numpy.fft.rfft(my_numpy_array)

and replace the amplitudes that can be obtained with:

>>> my_amplitudes = numpy.abs(my_rfft)

with amplitudes from an arbitrary numpy array's rFFT, which is to then be
converted back using numpy.fft.irfft .  Alternately, some future plans will
involve having to modify individual array element amplitudes directly based
on other parameters.  I would think that modifying and re-synthesizing
signals using FFT is a fairly common use-case, but my attempts at Googling
example code have been fruitless.

I'm not sure if my rudimentary knowledge of FFT is failing me, or if I'm
just not understanding how numpy represents and exposes the data, but I
would really appreciate any help I can get :)

/carl/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20130903/60f2b53d/attachment.html>


More information about the NumPy-Discussion mailing list