We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
np.random.rand
np.random.Generator
1 parent a41ae5b commit 1668d73Copy full SHA for 1668d73
data_structures/kd_tree/example/hypercube_points.py
@@ -2,4 +2,5 @@
2
3
4
def hypercube_points(num_points, hypercube_size, num_dimensions):
5
- return hypercube_size * np.random.rand(num_points, num_dimensions)
+ rng = np.random.default_rng()
6
+ return hypercube_size * rng.random((num_points, num_dimensions))
0 commit comments