diff --git a/GPy/kern/_src/static.py b/GPy/kern/_src/static.py index b32077e9..e7bee6c2 100644 --- a/GPy/kern/_src/static.py +++ b/GPy/kern/_src/static.py @@ -25,6 +25,8 @@ class Static(Kern): return np.zeros(X.shape) def gradients_XX(self, dL_dK, X, X2): + if X2 is None: + X2 = X return np.zeros((X.shape[0], X2.shape[0], X.shape[1]), dtype=np.float64) def gradients_XX_diag(self, dL_dKdiag, X): return np.zeros(X.shape)