From 43c2f8af87ee5da29b392f9af9ecceaf8c64c866 Mon Sep 17 00:00:00 2001 From: Max Zwiessele Date: Fri, 31 May 2013 12:01:29 +0100 Subject: [PATCH] SCG: printing corrected, dont return before end of method --- GPy/inference/SCG.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/GPy/inference/SCG.py b/GPy/inference/SCG.py index b978a50c..fc8ce21a 100644 --- a/GPy/inference/SCG.py +++ b/GPy/inference/SCG.py @@ -105,7 +105,8 @@ def SCG(f, gradf, x, optargs=(), maxiters=500, max_f_eval=500, display=True, xto if function_eval >= max_f_eval: status = "Maximum number of function evaluations exceeded" - return x, flog, function_eval, status + break +# return x, flog, function_eval, status Delta = 2.*(fnew - fold) / (alpha * mu) if Delta >= 0.: @@ -127,7 +128,8 @@ def SCG(f, gradf, x, optargs=(), maxiters=500, max_f_eval=500, display=True, xto # Test for termination if (np.max(np.abs(alpha * d)) < xtol) or (np.abs(fnew - fold) < ftol): status = 'converged' - return x, flog, function_eval, status + break +# return x, flog, function_eval, status else: # Update variables for new position