scipy 1.8.0 Pypi GitHub Homepage
Other Docs
NotesParametersRaisesBackRef
set_global_backend(backend, coerce=False, only=False, try_last=False)

This utility method replaces the default backend for permanent use. It will be tried in the list of backends automatically, unless the only flag is set on a backend. This will be the first tried backend outside the set_backend context manager.

Notes

This will overwrite the previously set global backend, which, by default, is the SciPy implementation.

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.

coerce : bool

Whether to coerce input types when trying this backend.

only : bool

If True , no more backends will be tried if this fails. Implied by coerce=True .

try_last : bool

If True , the global backend is tried after registered backends.

Raises

ValueError: If the backend does not implement ``numpy.scipy.fft``.

Sets the global fft backend

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])
See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

scipy.fft._backend.register_backend scipy.fft._backend.set_global_backend

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : /scipy/fft/_backend.py#45
type: <class 'function'>
Commit: