File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -43,8 +43,8 @@ def vanilla_func(x, y) -> np.ndarray:
4343
4444
4545def mock_runner (x , y , queue , function ):
46- for i in range ( len ( x ) ):
47- x [i ] = function (x [ i ] , y , check_threads = True )
46+ for i , xi in enumerate ( x ):
47+ x [i ] = function (xi , y , check_threads = True )
4848 if queue is not None :
4949 queue .put (Signal .UPDATE )
5050 if queue is not None :
@@ -72,7 +72,7 @@ def test_parallelize_loky(func, n_jobs):
7272 arr2 = np .arange (n )
7373 runner = partial (mock_runner , function = func )
7474 # this is the expected result of the function
75- expected = [func (arr1 [ i ] , arr2 , check_threads = False ) for i in range ( len ( arr1 )) ]
75+ expected = [func (a1 , arr2 , check_threads = False ) for a1 in arr1 ]
7676 # this will be set to something other than 1,2,8
7777 # we want to check if setting the threads works
7878 # then after the function is run if the numba cores are set back to 1
You can’t perform that action at this time.
0 commit comments