Skip to content

Commit

Permalink
Fixed an issue with multiple dimension being merged into one
Browse files Browse the repository at this point in the history
  • Loading branch information
YHordijk committed Mar 23, 2024
1 parent aaaffdf commit 2a7d728
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tcutility/geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ def random_points_on_sphere(shape: Tuple[int], radius: float = 1) -> np.ndarray:
Array of coordinates on a sphere.
"""
x = np.random.randn(*shape)
x = x / np.linalg.norm(x, axis=1) * radius
x = x / np.linalg.norm(x, axis=1, keepdims=True) * radius
return x


Expand Down

0 comments on commit 2a7d728

Please sign in to comment.