From 87891e179af3808f10a457cf73aef654e9695a64 Mon Sep 17 00:00:00 2001 From: BayaneMdW Date: Wed, 27 Apr 2022 14:00:38 +0200 Subject: [PATCH] fix bug in cartesian_to_spherical function --- space/coordinates/coordinates.py | 1 - 1 file changed, 1 deletion(-) diff --git a/space/coordinates/coordinates.py b/space/coordinates/coordinates.py index 8ece7d4..35e9a7e 100644 --- a/space/coordinates/coordinates.py +++ b/space/coordinates/coordinates.py @@ -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