'moment conditions for estimating distribution parameters by matching
quantiles, defines as many moment conditions as quantiles.
Returns
difference : array
difference between theoretical and empirical quantiles
Notes
This can be used for method of moments or for generalized method of
moments.'

def momcond(self, params):

    if (len(params) == 2):
        (loc, scale) = params
    elif (len(params) == 3):
        (shape, loc, scale) = params
    else:
        pass
    (pq, xq) = (self.pquant, self.xquant)
    cdfdiff = (self.distfn.cdf(xq, *params) - pq)
    return np.atleast_2d(cdfdiff)
