def METHOD_NAME(rtp: np.ndarray) -> np.ndarray:
    """
    rho-theta-phi to xyz transform
    Returns
    -------
    xyz : (3,) float ndarray
        the x, y, z in the local coordinate system
    """
    rtp = np.atleast_2d(rtp)
    assert len(rtp.shape) == 2, rtp.shape
    R = rtp[:, 0]
    theta = np.radians(rtp[:, 1])
    phi = np.radians(rtp[:, 2])
    x = R * np.sin(theta) * np.cos(phi)
    y = R * np.sin(theta) * np.sin(phi)
    z = R * np.cos(theta)
    return np.array([x, y, z], dtype=rtp.dtype).T