diff --git a/GPy/core/gp.py b/GPy/core/gp.py index f6e960ed..05e3e671 100644 --- a/GPy/core/gp.py +++ b/GPy/core/gp.py @@ -94,6 +94,9 @@ class GP(Model): #var = Kxx - np.sum(LiKx*LiKx, 0) var = Kxx - np.sum(WiKx*Kx, 0) var = var.reshape(-1, 1) + + #force mu to be a column vector + if len(mu.shape)==1: mu = mu[:,None] return mu, var def predict(self, Xnew, full_cov=False, Y_metadata=None): diff --git a/GPy/likelihoods/bernoulli.py b/GPy/likelihoods/bernoulli.py index 2e301fdd..6c22e3d1 100644 --- a/GPy/likelihoods/bernoulli.py +++ b/GPy/likelihoods/bernoulli.py @@ -212,7 +212,7 @@ class Bernoulli(Likelihood): np.seterr(**state) return d3logpdf_dlink3 - def samples(self, gp): + def samples(self, gp, Y_metadata=None): """ Returns a set of samples of observations based on a given value of the latent variable.