import torch


def pol2cart(rho, phi):
    """
        Function that converts polar coordinates to cartesian coordinates.
    """

    x = rho * torch.cos(phi)
    y = rho * torch.sin(phi)
    return x, y