[Numpy-discussion] Enhancements for NumPy's FFTs

David Cournapeau cournape@gmail....
Sun Mar 15 02:18:48 CDT 2009


On Sun, Mar 15, 2009 at 5:16 AM, Sturla Molden <sturla@molden.no> wrote:
>
>
> 1) I have noticed that fftpack_litemodule.c does not release the GIL
> around calls to functions in fftpack.c. I cannot se any obvious reason for
> this. As far as I can tell, the functions in fftpack.c are re-entrant.
>
> 2) If fftpack_lite did release the GIL, it would allow functions in
> numpy.fft to use multithreading for multiple FFTs in parallel
> (threading.Thread are ok, not special compilation needed).

Both are fines to modify for 1.3.

>
> 3) Is there any reason numpy.fft does not have dct? If not, I'd suggest
> addition of numpy.fft.dct and numpy.fft.idct.

numpy.fft is only here for compatibility with older array packages
AFAIK. So we should not add new features. I would much prefer to see
those kind of things in scipy.fftpack (which already have DCT I, II
and III). Adding dct to numpy.fft will only add to the confusion, I
think. There is already enough duplication between numpy and scipy,
let's not add more.

>
> 4) Regarding ticket #400: Cython now makes this easy. NumPy's FFTs should
> be exposed to C extesions without calling back to Python.

Agreed - that's one area where we could much more, but this has to be
done carefully. I am a bit worried of doing this kind of things at the
last minute. 1, 2 are OK for the trunk, but not 4 (because it impacts
public API), IMO.

cheers,

David


More information about the Numpy-discussion mailing list