def gamma(a, r, shape=[]):
    """gamma(a, r) or gamma(a, r, [n, m, ...]) returns array of gamma distributed random numbers."""
    if shape == []:
        shape = None
    return mt.gamma(a, r, shape)
Esempio n. 2
0
def invGamma(alpha, beta):
    return 1.0 / gamma(alpha, 1 / beta)
Esempio n. 3
0
def gamma(a, r, shape=[]):
    """gamma(a, r) or gamma(a, r, [n, m, ...]) returns array of gamma distributed random numbers."""
    if shape == []:
        shape = None
    return mt.gamma(a, r, shape)
Esempio n. 4
0
def invGamma(alpha, beta):
    return 1.0 / gamma(alpha, 1/beta)