import math


def cart2sph(vect):
    """Converts cartesian coords to spherical"""

    theta = math.atan2(math.sqrt(vect[0]**2 + vect[1]**2), vect[2])
    phi = math.atan2(vect[1], vect[0])

    return [theta, phi]