From ce9ee6c7585d4030f6a70d65e981b0f5a7ed492b Mon Sep 17 00:00:00 2001 From: James Hensman Date: Tue, 1 Sep 2015 22:38:49 +0100 Subject: [PATCH] ensuring the shape of the mean vector at predict time fixes bug in EP prediction --- GPy/core/gp.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/GPy/core/gp.py b/GPy/core/gp.py index ddef0647..a87ac66e 100644 --- a/GPy/core/gp.py +++ b/GPy/core/gp.py @@ -201,6 +201,8 @@ class GP(Model): Kx = kern.K(self.X, Xnew) mu = np.dot(Kx.T, self.posterior.woodbury_vector) + if len(mu.shape)==1: + mu = mu.reshape(-1,1) if full_cov: Kxx = kern.K(Xnew) if self.posterior.woodbury_inv.ndim == 2: