import torch


def c2d(x):
    """
    Transform Cartesian coordinates to polar degree (r=1).
    Parameters
    ----------
    x, y : floats or arrays
        Cartesian coordinates
    Returns
    -------
    theta : floats or arrays
        Polar degree
    """
    x0, x1 = x.select(-1,0), x.select(-1,1)
    return torch.atan2(x1,x0)