[Numpy-discussion] fourier with single precision

Lars Friedrich lfriedri@imtek...
Thu Aug 2 11:40:13 CDT 2007


Hello,

David Cournapeau wrote:
> As far as I can read from the fft code in numpy, only double is 
> supported at the moment, unfortunately. Note that you can get some speed 
> by using scipy.fftpack methods instead, if scipy is an option for you.

What I understood is that numpy uses FFTPACK's algorithms. From 
www.netlib.org/fftpack (is this the right address?) I took that there is 
a single-precision and double-precision-version of the algorithms. How 
hard would it be (for example for me...) to add the single-precision 
versions to numpy? I am not a decent C-hacker, but if someone tells me, 
that this task is not *too* hard, I would start looking more closely at 
the code...

Would it make sense, that if one passes an array of dtype = 
numpy.float32 to the fft function, a complex64 is returned, and if one 
passes an array of dtype = numpy.float64, a complex128 is returned?

Lars


More information about the Numpy-discussion mailing list