diff --git a/GPy/core/gp.py b/GPy/core/gp.py index c2d2010c..63316384 100644 --- a/GPy/core/gp.py +++ b/GPy/core/gp.py @@ -209,6 +209,8 @@ class GP(Model): var = Kxx - np.sum(WiKx*Kx, 0) var = var.reshape(-1, 1) + var[var<0.] = 0. + #force mu to be a column vector if len(mu.shape)==1: mu = mu[:,None]