Skip to content

Commit

Permalink
fix bug in cartesian_to_spherical function
Browse files Browse the repository at this point in the history
  • Loading branch information
BayaneMdW committed Apr 27, 2022
1 parent 7d877b6 commit 87891e1
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion space/coordinates/coordinates.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ def cartesian_to_spherical(x, y, z):
r = np.sqrt(x ** 2 + y ** 2 + z ** 2)
theta = np.arccos(x / r)
phi = np.arctan2(y, z)
phi[z==0]=np.sign(y)*np.pi/2
return r, theta, phi


Expand Down

0 comments on commit 87891e1

Please sign in to comment.