Skip to content

Commit

Permalink
fix: use nthreads=1 when multithreaded not available
Browse files Browse the repository at this point in the history
  • Loading branch information
steven-murray committed Apr 30, 2024
1 parent cd3cf30 commit 3d64cae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/powerbox/dft_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 3d64cae

Please sign in to comment.