From 96b5da161dff73ad1839cc47c98d38d2438c51c9 Mon Sep 17 00:00:00 2001 From: Max Zwiessele Date: Mon, 14 Sep 2015 17:12:31 +0100 Subject: [PATCH] Update rv_transformation_tests.py --- GPy/testing/rv_transformation_tests.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/GPy/testing/rv_transformation_tests.py b/GPy/testing/rv_transformation_tests.py index 58f42348..6462a7e5 100644 --- a/GPy/testing/rv_transformation_tests.py +++ b/GPy/testing/rv_transformation_tests.py @@ -56,7 +56,7 @@ class RVTransformationTestCase(unittest.TestCase): # The following test cannot be very accurate self.assertTrue(np.linalg.norm(pdf_phi - kde(phi)) / np.linalg.norm(kde(phi)) <= 1e-1) - def _test_grad(self): + def _test_grad(self, trans): m = TestModel(np.random.uniform(.5, 1.5, 20)) prior = GPy.priors.LogGaussian(.5, 0.1) m.theta.set_prior(prior) @@ -65,9 +65,11 @@ class RVTransformationTestCase(unittest.TestCase): def test_Logexp(self): self._test_trans(GPy.constraints.Logexp()) + self._test_grad(GPy.constraints.Logexp()) def test_Exponent(self): self._test_trans(GPy.constraints.Exponent()) + self._test_grad(GPy.constraints.Exponent()) if __name__ == '__main__':