def logmps(params, xsorted, dist):
 xcdf = np.r_[(0.0, dist.cdf(xsorted, *params), 1.0)]
 D = np.diff(xcdf)
 return (- np.log(D).mean())

def logmps ( params , xsorted , dist ) : xcdf = np . r_ [ ( 0.0 , dist . cdf ( xsorted , * params ) , 1.0 ) ] D = np . diff ( xcdf ) return ( - np . log ( D ) . mean ( ) )
calculate negative log of product-of-spacings parameters params : array_like .