From 16bc77a1edeeadeb377f794707e4752a4827630e Mon Sep 17 00:00:00 2001 From: Michael T Smith Date: Wed, 3 Aug 2016 18:12:56 +0100 Subject: [PATCH] More useful message from testing re offset estimate --- GPy/testing/model_tests.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/GPy/testing/model_tests.py b/GPy/testing/model_tests.py index ff137299..e2c05aec 100644 --- a/GPy/testing/model_tests.py +++ b/GPy/testing/model_tests.py @@ -421,8 +421,9 @@ class MiscTests(unittest.TestCase): Y = np.vstack([Y,Y]) m = GPy.models.GPOffsetRegression(X,Y) + assert m.checkgrad(), "Gradients of offset parameters don't match numerical approximations." m.optimize() - assert np.abs(m.offset[0]-offset)<0.1, "GPOffsetRegression model failing to estimate correct offset." + assert np.abs(m.offset[0]-offset)<0.1, ("GPOffsetRegression model failing to estimate correct offset (value estimated = %0.2f instead of %0.2f)" % (m.offset[0], offset))