scipy.fft.set_global_backend¶
- scipy.fft.set_global_backend(backend)[source]¶
Sets the global fft backend
The global backend has higher priority than registered backends, but lower priority than context-specific backends set with
set_backend
.- Parameters
- backend{object, ‘scipy’}
The backend to use. Can either be a
str
containing the name of a known backend {‘scipy’} or an object that implements the uarray protocol.
- Raises
- ValueError: If the backend does not implement
numpy.scipy.fft
.
- ValueError: If the backend does not implement
Notes
This will overwrite the previously set global backend, which, by default, is the SciPy implementation.
Examples
We can set the global fft backend:
>>> from scipy.fft import fft, set_global_backend >>> set_global_backend("scipy") # Sets global backend. "scipy" is the default backend. >>> fft([1]) # Calls the global backend array([1.+0.j])