From 122e6781c1f07f3aa5e2f0b80d35d98ec02dc0eb Mon Sep 17 00:00:00 2001 From: Max Zwiessele Date: Sun, 13 Sep 2015 18:53:31 +0100 Subject: [PATCH] Update rv_transformation_tests.py --- GPy/testing/rv_transformation_tests.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/GPy/testing/rv_transformation_tests.py b/GPy/testing/rv_transformation_tests.py index 6535a844..e00ec563 100644 --- a/GPy/testing/rv_transformation_tests.py +++ b/GPy/testing/rv_transformation_tests.py @@ -56,13 +56,14 @@ 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) # Check the gradients at a few random points - checks_failes = 0. + checks_failed = 0. checks = 40 for i in range(checks): m.theta = theta_s[i] print(m.theta, m.optimizer_array, m.param_array) - if not m.checkgrad(1): - checks_failes += 1. + if not m.checkgrad(): + checks_failed += 1. + m.checkgrad(1) self.assertTrue(checks_failed/float(checks) > .7)