From 433b2131654d8cc84f646b822f9a3875d83a312c Mon Sep 17 00:00:00 2001 From: James Hensman Date: Thu, 13 Mar 2014 17:02:29 +0000 Subject: [PATCH] independent output gradients --- GPy/kern/_src/independent_outputs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GPy/kern/_src/independent_outputs.py b/GPy/kern/_src/independent_outputs.py index 0cbd5be4..438168a0 100644 --- a/GPy/kern/_src/independent_outputs.py +++ b/GPy/kern/_src/independent_outputs.py @@ -83,7 +83,7 @@ class IndependentOutputs(Kern): target = np.zeros_like(X) slices = index_to_slices(X[:,self.index_dim]) if X2 is None: - [[np.copyto(target[s,self.kern.active_dims], self.kern.gradients_X(dL_dK[s,s],X[s],X[ss])) for s, ss in product(slices_i, slices_i)] for slices_i in slices] + [[np.copyto(target[s,self.kern.active_dims], self.kern.gradients_X(dL_dK[s,ss],X[s],X[ss])) for s, ss in itertools.product(slices_i, slices_i)] for slices_i in slices] else: X2,slices2 = X2[:,:self.index_dim],index_to_slices(X2[:,-1]) [[[np.copyto(target[s,:self.index_dim], self.kern.gradients_X(dL_dK[s,s2], X[s], X2[s2])) for s in slices_i] for s2 in slices_j] for slices_i,slices_j in zip(slices,slices2)]