import torch


def polar_to_cart(r, theta):
    """Converts polar to cartesian coordinates.
    """
    ret = torch.cat([torch.cos(theta).unsqueeze(0),
                     torch.sin(theta).unsqueeze(0)]).squeeze() * r
    return ret