def mvnormcdf(upper, mu, cov, lower=None, **kwds):
 upper = np.array(upper)
 if (lower is None):
  lower = ((- np.ones(upper.shape)) * np.inf)
 else:
  lower = np.array(lower)
 cov = np.array(cov)
 stdev = np.sqrt(np.diag(cov))
 lower = ((lower - mu) / stdev)
 upper = ((upper - mu) / stdev)
 divrow = np.atleast_2d(stdev)
 corr = ((cov / divrow) / divrow.T)
 return mvstdnormcdf(lower, upper, corr, **kwds)

def mvnormcdf ( upper , mu , cov , lower = None , ** kwds ) : upper = np . array ( upper ) if ( lower is None ) : lower = ( ( - np . ones ( upper . shape ) ) * np . inf ) else : lower = np . array ( lower ) cov = np . array ( cov ) stdev = np . sqrt ( np . diag ( cov ) ) lower = ( ( lower - mu ) / stdev ) upper = ( ( upper - mu ) / stdev ) divrow = np . atleast_2d ( stdev ) corr = ( ( cov / divrow ) / divrow . T ) return mvstdnormcdf ( lower , upper , corr , ** kwds )
multivariate normal cumulative distribution function this is a wrapper for scipy .