You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Optionally allow pyFFTW in place of numpy.fft #2092
The pyFFTW provides a nice lightweight Python library that wraps FFTW. Given how well optimized FFTW is, this ends up being significantly faster. Thanks to its interfaces it is pretty easy to drop in a pyFFTW in place of NumPy's FFTPACK. Would be nice if there was an option (maybe a function?) to change up the FFT backend used in Dask.
Yeah, Dask probably can't do that responsibly. You could in your own code thought.
Probably there is some way to change _fft_wrap to take a function name, like 'fft' and produce a function that takes an fft module as a keyword argument. This keyword would default to np.fft but could be replaced by others.
A different idea might be to let people wrap their own FFTs. So we provide functions like *fft_wrap, which take an FFT function of that type and return a function that can perform an FFT of that form. So as an example fft_wrap(numpy.fft.fft) would return the same thing as dask.array.fft.fft.
Sure, that sounds like a great idea. Presumably this works well now. We might want to make the _fft_wrap function slightly more user-facing with a nice docstring with examples and such.
Activity
mrocklin commentedon Mar 16, 2017
jakirkham commentedon Mar 16, 2017
This is not very clever, but I had thought about just reassigning what
npfftpoints to after the fact.mrocklin commentedon Mar 16, 2017
Yeah, Dask probably can't do that responsibly. You could in your own code thought.
Probably there is some way to change
_fft_wrapto take a function name, like'fft'and produce a function that takes an fft module as a keyword argument. This keyword would default tonp.fftbut could be replaced by others.jakirkham commentedon Mar 16, 2017
A different idea might be to let people wrap their own FFTs. So we provide functions like
*fft_wrap, which take an FFT function of that type and return a function that can perform an FFT of that form. So as an examplefft_wrap(numpy.fft.fft)would return the same thing asdask.array.fft.fft.mrocklin commentedon Mar 16, 2017
Sure, that sounds like a great idea. Presumably this works well now. We might want to make the
_fft_wrapfunction slightly more user-facing with a nice docstring with examples and such.jakirkham commentedon Mar 16, 2017
Ok, I'll give it a look.
jakirkham commentedon Mar 16, 2017
Please see PR ( #2093 ).
jakirkham commentedon Nov 26, 2018
Probably worth noting that as of pyFFTW 0.11.0+, they provide a Dask-like interface, which can be used as a drop-in substitute for the one we provide.
ref: https://pyfftw.readthedocs.io/en/latest/source/pyfftw/interfaces/interfaces.html#dask-fft
mrocklin commentedon Nov 26, 2018