#NEWLINE# def test_onetree_query( ) : #NEWLINE# #INDENT# np . random . seed ( 0 ) #NEWLINE# n = 50 #NEWLINE# k = 4 #NEWLINE# points = np . random . randn ( n , k ) #NEWLINE# T = KDTree ( points ) #NEWLINE# ( yield ( check_onetree_query , k , 0.1 ) ) #NEWLINE# points = np . random . randn ( ( 3 * n ) , k ) #NEWLINE# points [ : n ] *= 0.001 #NEWLINE# points [ n : ( 2 * n ) ] += 2 #NEWLINE# T = KDTree ( points ) #NEWLINE# ( yield ( check_onetree_query , T , 0.1 ) ) #NEWLINE# ( yield ( check_onetree_query , T , 0.001 ) ) #NEWLINE# ( yield ( check_onetree_query , T , 1e-05 ) ) #NEWLINE# ( yield ( check_onetree_query , T , 1e-06 ) )