scipy 1.8.0 Pypi GitHub Homepage
Other Docs
ParametersRaisesBackRef
register_backend(backend)

Registered backends have the lowest priority and will be tried after the global 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``.

Register a backend for permanent use.

Examples

We can register a new fft backend:

>>> from scipy.fft import fft, register_backend, set_global_backend
... class NoopBackend: # Define an invalid Backend
...  __ua_domain__ = "numpy.scipy.fft"
...  def __ua_function__(self, func, args, kwargs):
...  return NotImplemented
... set_global_backend(NoopBackend()) # Set the invalid backend as global
... register_backend("scipy") # Register a new backend
... fft([1]) # The registered backend is called because the global backend returns `NotImplemented` array([1.+0.j])
>>> set_global_backend("scipy")  # Restore global backend to default
See :

Back References

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

scipy.fft._backend.register_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#89
type: <class 'function'>
Commit: