import mpmath


def mean(loc, scale):
    """
    Mean of the Gumbel distribution.
    """
    if scale <= 0:
        raise ValueError('scale must be positive.')

    with mpmath.extradps(5):
        loc = mpmath.mpf(loc)
        scale = mpmath.mpf(scale)
        return loc + mpmath.euler*scale