def cart_to_pol(points):
    'Converts a list of cartesian coordinates into polar ones.\n\n       Arguments:\n       points: The list of points in the format [x,y].\n\n       Returns:\n       A list of polar coordinates in the format [radius,angle].'
    pol = np.empty(points.shape)
    pol[:, 0] = np.sqrt(((points[:, 0] ** 2) + (points[:, 1] ** 2)))
    pol[:, 1] = np.arctan2(points[:, 1], points[:, 0])
    return pol
Converts a list of cartesian coordinates into polar ones.

Arguments:
points: The list of points in the format [x,y].

Returns:
A list of polar coordinates in the format [radius,angle].
def cart_to_pol(points):
    'Converts a list of cartesian coordinates into polar ones.\n\n       Arguments:\n       points: The list of points in the format [x,y].\n\n       Returns:\n       A list of polar coordinates in the format [radius,angle].'
    pol = np.empty(points.shape)
    pol[:, 0] = np.sqrt(((points[:, 0] ** 2) + (points[:, 1] ** 2)))
    pol[:, 1] = np.arctan2(points[:, 1], points[:, 0])
    return pol