import torch


def variance(data:torch.Tensor) -> torch.Tensor:
    """
    Compute the variance for given input data.

    Parameters
    ----------
    data: torch.Tensor
        input data

    Returns
    -------
    variance (torch.Tensor)

    """
    return data.var(-1)