Skip to content

Commit a712dd3

Browse files
Merge pull request #12 from IntelPython/domain-set-num-threads-must-allow-zero
2 parents 862454b + f5082f4 commit a712dd3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mkl/_mkl_service.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ cpdef domain_set_num_threads(num_threads, domain='all'):
9999
https://software.intel.com/en-us/mkl-developer-reference-c-mkl-domain-set-num-threads
100100
"""
101101
cdef c_num_threads = __python_obj_to_int(num_threads, 'domain_set_num_threads')
102-
__check_positive_num_threads(c_num_threads, 'domain_set_num_threads')
102+
__check_non_negative_num_threads(c_num_threads, 'domain_set_num_threads')
103103

104104
cdef int c_mkl_domain = __domain_to_mkl_domain(domain)
105105
cdef int c_mkl_status = __domain_set_num_threads(c_num_threads, c_mkl_domain)
@@ -396,7 +396,7 @@ cdef void __check_positive_num_threads(int p, func_name):
396396

397397
cdef void __check_non_negative_num_threads(int p, func_name):
398398
if p < 0:
399-
warnings.warn("Non-positive argument of " + func_name +
399+
warnings.warn("Negative argument of " + func_name +
400400
" is being ignored, number of threads will not be changed")
401401

402402

0 commit comments

Comments
 (0)