Testing for dims should be checking whether 2nd dim is greater than 1

This commit is contained in:
Neil Lawrence 2017-12-31 23:22:23 +01:00 committed by GitHub
parent cb1ab89d8a
commit ff4f861fcb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -568,7 +568,7 @@ class GP(Model):
for d in range(self.output_dim):
if full_cov and v.ndim == 3:
fsim[d] = sim_one_dim(m[:, d], v[:, :, d])
elif (not full_cov) and v.ndim == 2:
elif (not full_cov) and v.shape[1]>1:
fsim[d] = sim_one_dim(m[:, d], v[:, d])
else:
fsim[d] = sim_one_dim(m[:, d], v)