#NEWLINE# def test_query_ball_point_multithreading( ) : #NEWLINE# #INDENT# np . random . seed ( 0 ) #NEWLINE# n = 5000 #NEWLINE# k = 2 #NEWLINE# points = np . random . randn ( n , k ) #NEWLINE# T = cKDTree ( points ) #NEWLINE# l1 = T . query_ball_point ( points , 0.003 , n_jobs = 1 ) #NEWLINE# l2 = T . query_ball_point ( points , 0.003 , n_jobs = 64 ) #NEWLINE# l3 = T . query_ball_point ( points , 0.003 , n_jobs = ( - 1 ) ) #NEWLINE# for i in range ( n ) : #NEWLINE# #INDENT# if ( l1 [ i ] or l2 [ i ] ) : #NEWLINE# #INDENT# assert_array_equal ( l1 [ i ] , l1 [ i ] ) #NEWLINE# #UNINDENT# #UNINDENT# for i in range ( n ) : #NEWLINE# #INDENT# if ( l1 [ i ] or l3 [ i ] ) : #NEWLINE# #INDENT# assert_array_equal ( l1 [ i ] , l3 [ i ] )