def test_gradient_logpdf(self, ma2): prior = ModelPrior(ma2) rv = prior.rvs(size=10) grads = prior.gradient_logpdf(rv) assert grads.shape == rv.shape assert np.allclose(grads, 0)
def test_pdf(self, ma2): prior = ModelPrior(ma2) rv = prior.rvs(size=10) assert np.allclose(prior.pdf(rv), np.exp(prior.logpdf(rv)))