import torch


def unif(n):

    """return a uniform histogram of length n (simplex)
    
    Parameters
    ----------
    n : int
        number of bins in the histogram
    Returns
    -------
    h : torch.Tensor (n,)
        histogram of length n such that h_i=1/n for all i
    """
    return torch.ones(n)/n