def gen_gamma(params, size, rg):
    """
    generating function for gamma distribution
    Inputs:
        params (ndarray) alpha, beta
        size : number of points to draw
        rg : random number generator (np.random.default_rng)
    Outputs:
        values from gamma distribution, parametrized by params
    """
    alpha, beta = params
    return rg.gamma(alpha, 1 / beta, size=size)