Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Replace np.fft routines with pyFFTW #20
For speeding up routines involving fft pyFFTW (https://github.com/pyFFTW/pyFFTW) may be a good choice.
It comes with an extra dependency and will leave the user with the manual installation of FFTW as described in pyFFTW manual, but it has wrappers to numpy/scipy fits, so we could fallback to bumpy if FFTW is not available.
Correct user will have to install FFTW. My initial thoughts are that more HPC oriented libraries (pyfftw, numba, pycuda, Dask) will be eventually used but we should always have fallbacks to basic libraries (numpy-scipy).
For example here we could have a private class _FFT_numpy and one _FFT_fftw and then a function FFT creating the correct operator based on user flag + check that pyfftw can be imported. Just an idea, maybe there is even a better way?
All said, the condition for pyfftw to be included is that we can have a travis build able to install FFTW and do tests on the FFT operators (that should be doable as pyfftw does it itself), if so I would say pyfftw should be used as fft is at the core of many operators (and run 100-200 times during an inversion with iterative solvers)