From 92c703ba1289761ce1d0a3a99bbc13ffa685f98c Mon Sep 17 00:00:00 2001 From: Max Zwiessele Date: Sat, 12 Sep 2015 18:56:00 +0100 Subject: [PATCH] Update rv_transformation_tests.py --- GPy/testing/rv_transformation_tests.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/GPy/testing/rv_transformation_tests.py b/GPy/testing/rv_transformation_tests.py index d9bdeb49..f645ca10 100644 --- a/GPy/testing/rv_transformation_tests.py +++ b/GPy/testing/rv_transformation_tests.py @@ -30,8 +30,7 @@ class RVTransformationTestCase(unittest.TestCase): m.theta.set_prior(prior) m.theta.unconstrain() m.theta.constrain(trans) - np.random.seed(1234) - theta_s = prior.rvs(5e5) + theta_s = prior.rvs(1e6) if kde: # The PDF of the transformed variables p_phi = lambda phi : np.exp(-m._objective_grads(phi)[0]) @@ -58,7 +57,8 @@ class RVTransformationTestCase(unittest.TestCase): # END OF PLOT # Check the gradients at a few random points for i in range(5): - m.theta = i+1. + m.theta = theta_s[i] + m.unset_prior() self.assertTrue(m.checkgrad(verbose=True)) def test_Logexp(self):