parameters: (self, X)
return_statement: return np.vstack([kernel.diag(X) for kernel in self.kernels]).T
docstring: Returns the diagonal of the kernel k(X, X).
  
          The result of this method is identical to np.diag(self(X)); however,
          it can be evaluated more efficiently since only the diagonal is
          evaluated.
  
          Parameters
          ----------
          X : sequence of length n_samples_X
              Argument to the kernel. Could either be array-like with
              shape = (n_samples_X, n_features) or a list of objects.
  
          Returns
          -------
          K_diag : array, shape (n_samples_X, n_kernels)
              Diagonal of kernel k(X, X)
docstring_summary: Returns the diagonal of the kernel k(X, X).
docstring_tokens: Returns the diagonal of the kernel k ( X X ) .
function: def diag(self, X):
          """Returns the diagonal of the kernel k(X, X).
  
          The result of this method is identical to np.diag(self(X)); however,
          it can be evaluated more efficiently since only the diagonal is
          evaluated.
  
          Parameters
          ----------
          X : sequence of length n_samples_X
              Argument to the kernel. Could either be array-like with
              shape = (n_samples_X, n_features) or a list of objects.
  
          Returns
          -------
          K_diag : array, shape (n_samples_X, n_kernels)
              Diagonal of kernel k(X, X)
          """
          return np.vstack([kernel.diag(X) for kernel in self.kernels]).T
function_tokens: def diag ( self , X ) : return np . vstack ( [ kernel . diag ( X ) for kernel in self . kernels ] ) . T