From 90c2912acefaf7d0f595e62f664a2317cea104ec Mon Sep 17 00:00:00 2001 From: Diego Torrejon Date: Wed, 21 Mar 2018 18:00:13 -0400 Subject: [PATCH 1/2] Fixes the dimensions of the samples output --- GPy/core/gp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GPy/core/gp.py b/GPy/core/gp.py index 536b2ad4..6c96d249 100644 --- a/GPy/core/gp.py +++ b/GPy/core/gp.py @@ -592,7 +592,7 @@ class GP(Model): if self.output_dim == 1: return sim_one_dim(m, v) else: - fsim = np.empty((self.output_dim, self.num_data, size)) + fsim = np.empty((self.output_dim, len(X), size)) for d in range(self.output_dim): if full_cov and v.ndim == 3: fsim[d] = sim_one_dim(m[:, d], v[:, :, d]) From 69eb888ad1367900ad15f61c7829ad0df11ce0af Mon Sep 17 00:00:00 2001 From: Diego Torrejon Date: Thu, 22 Mar 2018 16:32:05 -0400 Subject: [PATCH 2/2] Maintains consistency with numpy arrays --- GPy/core/gp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GPy/core/gp.py b/GPy/core/gp.py index 6c96d249..453de407 100644 --- a/GPy/core/gp.py +++ b/GPy/core/gp.py @@ -592,7 +592,7 @@ class GP(Model): if self.output_dim == 1: return sim_one_dim(m, v) else: - fsim = np.empty((self.output_dim, len(X), size)) + fsim = np.empty((self.output_dim, X.shape[0], size)) for d in range(self.output_dim): if full_cov and v.ndim == 3: fsim[d] = sim_one_dim(m[:, d], v[:, :, d])