Skip to main content
`Ctrl`+`K`
scipy.fft.

# set_workers

scipy.fft.set_workers(workers)

  Context manager for the default number of workers used in `scipy.fft`

  Parameters:
    workers int

      The default number of workers to use

  Notes

  Array API Standard Support

  `set_workers` is not in-scope for support of Python Array API Standard compatible backends other than NumPy.

  See Support for the array API standard for more information.

  Examples

      >>> import numpy as np
      >>> from scipy import fft, signal
      >>> rng = np.random.default_rng()
      >>> x = rng.standard_normal((128, 64))
      >>> with fft.set_workers(4):
      ...     y = signal.fftconvolve(x, x)