What did you do this week?
I have been working on my pull request to add scipy.fft. This included:
- Investigating and fixing test failures
- Adding an optimized general purpose FFT for real input
- Writing documentation
- Solving build issues
I've also created a working prototype backend system, with tests for the basic functionality of switching between backends and calling functions.
What is coming up next?
I will hopefully start to get reviews for my open pull request and can respond to feedback. I'll also continue to work on the backend system by expanding my current prototype and creating a parallel implementation using uarray which implements a similar backend system. This will be used to open a discussion about whether or not uarray is suitable and ready to be deployed within SciPy.
There are also a number of improvements that can be made to the general state of FFTs within SciPy. For example, scipy.fftpack can be made to use the faster PocketFFT implementation and PocketFFT itself can be expanded to include the sine and cosine transforms that are in fftpack.
Did you get stuck anywhere?
SciPy imports most of the NumPy API into it's own namespace. In particular, I discovered that numpy.fft.fft is imported as scipy.fft; conflicting with my new scipy.fft module. This will hopefully be deprecated and removed in a future version of SciPy but for the time being I've had to use a workaround for the issue. By overriding the module's __class__, we can make the scipy.fft module callable as if it were a function. This works, but has some unfortunate side effects, one of which was thoroughly confusing the documentation generator (sphinx) which silently ignored the whole scipy.fft module.
This whole tangle took a while to work out but I got there in the end.