We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
np.random.rand
np.random.Generator
1 parent 3222bd3 commit a41ae5bCopy full SHA for a41ae5b
data_structures/kd_tree/example/example_usage.py
@@ -12,7 +12,8 @@
12
points = hypercube_points(num_points, cube_size, num_dimensions)
13
hypercube_kdtree = build_kdtree(points.tolist())
14
15
-query_point = np.random.rand(num_dimensions).tolist()
+rng = np.random.default_rng()
16
+query_point = rng.random(num_dimensions).tolist()
17
18
nearest_point, nearest_dist, nodes_visited = nearest_neighbour_search(
19
hypercube_kdtree, query_point
0 commit comments