code: def update_gradients_diag(self, dL_dKdiag, X):
          
          self.variance.gradient = np.sum(dL_dKdiag)
          self.period.gradient = 0
          self.lengthscale.gradient = 0
docs: derivative of the diagonal of the covariance matrix with respect to the parameters.