import torch


def quantile(data:torch.Tensor, fraction:torch.Tensor) -> torch.Tensor:
    """
    Compute the quantile for given input data and list of fractions.

    Parameters
    ----------
    data: torch.Tensor
        input data
    fraction: torch.Tensor
        list of fractions

    Returns
    -------
    quantile (torch.Tensor)

    """
    return torch.quantile(data, fraction, dim=-1).swapaxes(0, -1)