def _cart2polar_2pi(x, y):
 (r, t) = (np.hypot(x, y), np.arctan2(y, x))
 t += np.where((t < 0.0), (2 * np.pi), 0)
 return (r, t)

def _cart2polar_2pi ( x , y ) : ( r , t ) = ( np . hypot ( x , y ) , np . arctan2 ( y , x ) ) t += np . where ( ( t < 0.0 ) , ( 2 * np . pi ) , 0 ) return ( r , t )
convert cartesian coordinates to polar non-standard range! maps to rather than usual .