original_docstring: 
      (r, alpha, sinbeta, cosbeta) = Cart2Sph(x,y,z)
      	
      Converts Cartesian coordinates (x,y,z) into Spherical Polar Coordinates
      (r, alpha, beta), where alpha is azimuth angle (angle in radians from the
      positive x axis, with rotation around the positive z axis according to
      the right-hand screw rule) and beta is polar angle (angle in radians from
      the positive z axis). beta can alternatively be returned as two arrays of
      its cos and sin values.
      	
      It is assumed that x, y and z are all the same size.
      The returned arrays will be the same size as the arguments.
      
docstring: (r, alpha, sinbeta, cosbeta) = Cart2Sph(x,y,z)
  Converts Cartesian coordinates (x,y,z) into Spherical Polar Coordinates
  (r, alpha, beta), where alpha is azimuth angle (angle in radians from the
  positive x axis, with rotation around the positive z axis according to
  the right-hand screw rule) and beta is polar angle (angle in radians from
  the positive z axis). beta can alternatively be returned as two arrays of
  its cos and sin values.
  
  It is assumed that x, y and z are all the same size.
  The returned arrays will be the same size as the arguments.
docstring_tokens: ( r alpha sinbeta cosbeta ) = Cart2Sph ( x y z ) Converts Cartesian coordinates ( x y z ) into Spherical Polar Coordinates ( r alpha beta ) where alpha is azimuth angle ( angle in radians from the positive x axis with rotation around the positive z axis according to the right - hand screw rule ) and beta is polar angle ( angle in radians from the positive z axis ) . beta can alternatively be returned as two arrays of its cos and sin values . It is assumed that x y and z are all the same size . The returned arrays will be the same size as the arguments .
code: def cart2sph(x,y,z):
      """
      (r, alpha, sinbeta, cosbeta) = Cart2Sph(x,y,z)
      	
      Converts Cartesian coordinates (x,y,z) into Spherical Polar Coordinates
      (r, alpha, beta), where alpha is azimuth angle (angle in radians from the
      positive x axis, with rotation around the positive z axis according to
      the right-hand screw rule) and beta is polar angle (angle in radians from
      the positive z axis). beta can alternatively be returned as two arrays of
      its cos and sin values.
      	
      It is assumed that x, y and z are all the same size.
      The returned arrays will be the same size as the arguments.
      """
      
      r = np.sqrt(x**2 + y**2 + z**2)
      rho = np.sqrt(x**2 + y**2)
      alpha = np.arctan2(y, x)
      cosbeta = z / r
      sinbeta = rho / r
      
      return r, alpha, sinbeta, cosbeta
code_tokens: def cart2sph ( x , y , z ) : r = np . sqrt ( x ** 2 + y ** 2 + z ** 2 ) rho = np . sqrt ( x ** 2 + y ** 2 ) alpha = np . arctan2 ( y , x ) cosbeta = z / r sinbeta = rho / r return r , alpha , sinbeta , cosbeta
short_docstring: (r, alpha, sinbeta, cosbeta) = Cart2Sph(x,y,z)
  Converts Cartesian coordinates (x,y,z) into Spherical Polar Coordinates
  (r, alpha, beta), where alpha is azimuth angle (angle in radians from the
  positive x axis, with rotation around the positive z axis according to
  the right-hand screw rule) and beta is polar angle (angle in radians from
  the positive z axis).
short_docstring_tokens: ( r alpha sinbeta cosbeta ) = Cart2Sph ( x y z ) Converts Cartesian coordinates ( x y z ) into Spherical Polar Coordinates ( r alpha beta ) where alpha is azimuth angle ( angle in radians from the positive x axis with rotation around the positive z axis according to the right - hand screw rule ) and beta is polar angle ( angle in radians from the positive z axis ) .
comment: """
      (r, alpha, sinbeta, cosbeta) = Cart2Sph(x,y,z)
      	
      Converts Cartesian coordinates (x,y,z) into Spherical Polar Coordinates
      (r, alpha, beta), where alpha is azimuth angle (angle in radians from the
      positive x axis, with rotation around the positive z axis according to
      the right-hand screw rule) and beta is polar angle (angle in radians from
      the positive z axis). beta can alternatively be returned as two arrays of
      its cos and sin values.
      	
      It is assumed that x, y and z are all the same size.
      The returned arrays will be the same size as the arguments.
      """