From 3d64cae442658dd8a1ef63a7334650ad6e824afd Mon Sep 17 00:00:00 2001 From: Steven Murray Date: Tue, 30 Apr 2024 13:39:32 +0200 Subject: [PATCH] fix: use nthreads=1 when multithreaded not available --- src/powerbox/dft_backend.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/powerbox/dft_backend.py b/src/powerbox/dft_backend.py index adcfb74..fd44930 100644 --- a/src/powerbox/dft_backend.py +++ b/src/powerbox/dft_backend.py @@ -88,7 +88,7 @@ def __init__(self, nthreads=None): try: pyfftw.builders._utils._default_threads(4) except ValueError: - if nthreads > 1: + if nthreads and nthreads > 1: warnings.warn( "pyFFTW was not installed with multithreading. Using 1 thread.", stacklevel=2,