def pdf(self, u: np.ndarray, log=False): sigma = self.sigma q = norm.ppf(u) d = mvn.logpdf(q, cov=sigma) - norm.logpdf(q).sum(1) return d if log else np.exp(d)
def pdf(self, x: np.ndarray, log=False): sigma = self.sigma q = norm.ppf(x) d = mvn.logpdf(q, cov=sigma) - norm.logpdf(q).sum(1) return d if log else np.exp(d)
def cdf(self, x: np.ndarray, log=False): q = norm.ppf(x) sigma = self.sigma return mvn.logcdf(q, cov=sigma) if log else mvn.cdf(q, cov=sigma)