File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 4141
4242double = np .double
4343long = int
44+ MAX_THREADS = 8
4445
4546
4647class test_numexpr (TestCase ):
@@ -1164,14 +1165,14 @@ def test_omp_num_threads_empty_string(self):
11641165 if 'sparc' in platform .machine ():
11651166 self .assertEqual (1 , numexpr ._init_num_threads ())
11661167 else :
1167- self .assertEqual (detect_number_of_cores (), numexpr ._init_num_threads ())
1168+ self .assertEqual (min ( detect_number_of_cores (), MAX_THREADS ), numexpr ._init_num_threads ())
11681169
11691170 def test_numexpr_max_threads_empty_string (self ):
11701171 with _environment ('NUMEXPR_MAX_THREADS' , '' ):
11711172 if 'sparc' in platform .machine ():
11721173 self .assertEqual (1 , numexpr ._init_num_threads ())
11731174 else :
1174- self .assertEqual (detect_number_of_cores (), numexpr ._init_num_threads ())
1175+ self .assertEqual (min ( detect_number_of_cores (), MAX_THREADS ), numexpr ._init_num_threads ())
11751176
11761177 def test_vml_threads_round_trip (self ):
11771178 n_threads = 3
You can’t perform that action at this time.
0 commit comments