Skip to content

Commit 1668d73

Browse files
Replaced legacy np.random.rand call with np.random.Generator in kd_tree/hypercube_points.py
1 parent a41ae5b commit 1668d73

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

data_structures/kd_tree/example/hypercube_points.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22

33

44
def hypercube_points(num_points, hypercube_size, num_dimensions):
5-
return hypercube_size * np.random.rand(num_points, num_dimensions)
5+
rng = np.random.default_rng()
6+
return hypercube_size * rng.random((num_points, num_dimensions))

0 commit comments

Comments
 (0)