import torch


def dist_tensor(p1, p2):
    """ Return the euclidean distance between two points.

    :param p1: First point.
    :param p2: Second point.
    :return: Euclidean distance.
    """
    return torch.sqrt((p1[0] - p2[0]) ** 2 + (p1[1] - p2[1]) ** 2)