def gammamomentcond2(distfn, params, mom2, quantile=None):
 (alpha, scale) = params
 mom2s = distfn.stats(alpha, 0.0, scale)
 return (np.array(mom2) - mom2s)

def gammamomentcond2 ( distfn , params , mom2 , quantile = None ) : ( alpha , scale ) = params mom2s = distfn . stats ( alpha , 0.0 , scale ) return ( np . array ( mom2 ) - mom2s )
estimate distribution parameters based method of moments for distributions with 1 shape parameter and fixed loc=0 .