Fix wrong optimization for Log Likelihood Gradient
Fixes
@@ -486,7 +486,7 @@ class GaussianProcessRegressor(MultiOutputMixin,
# constructing the full matrix tmp.dot(K_gradient) since only
# its diagonal is required
log_likelihood_gradient_dims = \
- 0.5 * np.einsum("ijl,ijk->kl", tmp, K_gradient)
+ 0.5 * np.einsum("ijl,jik->kl", tmp, K_gradient)
log_likelihood_gradient = log_likelihood_gradient_dims.sum(-1)
if eval_gradient:
