Update gp.py

Sample return seemed to have been based on number of training data, not number of posterior samples requested.
This commit is contained in:
Neil Lawrence 2017-12-31 22:54:43 +01:00 committed by GitHub
parent 97639ff2a6
commit cb1ab89d8a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -564,7 +564,7 @@ class GP(Model):
if self.output_dim == 1: if self.output_dim == 1:
return sim_one_dim(m, v) return sim_one_dim(m, v)
else: else:
fsim = np.empty((self.output_dim, self.num_data, size)) fsim = np.empty((self.output_dim, X.shape[1], size))
for d in range(self.output_dim): for d in range(self.output_dim):
if full_cov and v.ndim == 3: if full_cov and v.ndim == 3:
fsim[d] = sim_one_dim(m[:, d], v[:, :, d]) fsim[d] = sim_one_dim(m[:, d], v[:, :, d])