Random beta variates.

def rbeta(alpha, beta, size=None):
    """
    Random beta variates.
    """
    from scipy.stats.distributions import beta as sbeta
    return sbeta.ppf(np.random.random(size), alpha, beta)