bundles / scipy latest / scipy / fft / _backend / skip_backend
function
scipy.fft._backend:skip_backend
source: build-install/usr/lib/python3.14/site-packages/scipy/fft/_backend.py:176
Signature
def skip_backend(backend)Summary
Context manager to skip a backend within a fixed scope.
Extended Summary
Within the context of a with statement, the given backend will not be called. This covers backends registered both locally and globally. Upon exit, the backend will again be considered.
Parameters
backend: {object, 'scipy'}The backend to skip. Can either be a
strcontaining the name of a known backend {'scipy'} or an object that implements the uarray protocol.
Returns
context: uarray._SetBackendContextContext manager that skips the backend.
Notes
Array API Standard Support
skip_backend is not in-scope for support of Python Array API Standard compatible backends other than NumPy.
See dev-arrayapi for more information.
Examples
import scipy.fft as fft
✓fft.fft([1]) # Calls default SciPy backend with fft.skip_backend('scipy'): # We explicitly skip the SciPy backend fft.fft([1]) # leaving no implementation available✗
Traceback (most recent call last):
File "<doctest scipy.fft._backend:skip_backend[0]>", line 2, in <module>
fft.fft([1]) # leaving no implementation available
~~~~~~~^^^^^
uarray.BackendNotImplementedError: No selected backends had an implementation for this function.
Aliases
scipy.fft.skip_backend