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)
def invGamma(alpha, beta): return 1.0 / gamma(alpha, 1 / beta)
def invGamma(alpha, beta): return 1.0 / gamma(alpha, 1/beta)