Laplace (double exponential) random variates.

def rlaplace(mu, tau, size=None):
    """
    Laplace (double exponential) random variates.
    """

    u = np.random.uniform(-0.5, 0.5, size)
    return mu - np.sign(u) * np.log(1 - 2 * np.abs(u)) / tau