Skip to content

Commit

Permalink
Merge pull request #22 from BayaneMdW/models
Browse files Browse the repository at this point in the history
fix bug in cartesian_to_spherical function
  • Loading branch information
nicolasaunai committed Apr 27, 2022
2 parents 0a13e0c + 87891e1 commit 62a1971
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 62a1971

Please sign in to comment.