Skip to content

Commit c152832

Browse files
Fixed behavior of set_workers for negative values in mkl_fft.interfaces.scipy_fft to be scipy expects
1 parent 1464975 commit c152832

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mkl_fft/_scipy_fft_backend.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
from numpy.core import (take, sqrt, prod)
3232
import contextvars
3333
import operator
34+
import os
3435

3536

3637
__doc__ = """
@@ -153,7 +154,7 @@ def _workers_to_num_threads(w):
153154
if (_w == 0):
154155
raise ValueError("Number of workers must not be zero")
155156
if (_w < 0):
156-
ub = _cpu_max_threads_count().get_cpu_count()
157+
ub = os.get_cpu_count()
157158
_w += ub + 1
158159
if _w <= 0:
159160
raise ValueError("workers value out of range; got {}, must not be"

0 commit comments

Comments
 (0)