parameters: (self, X, Y=None, eval_gradient=False)
docstring: Return the kernel k(X, Y) and optionally its gradient.
  
          Parameters
          ----------
          X : sequence of length n_samples_X
              Left argument of the returned kernel k(X, Y)
              Could either be array-like with shape = (n_samples_X, n_features)
              or a list of objects.
  
          Y : sequence of length n_samples_Y
              Right argument of the returned kernel k(X, Y). If None, k(X, X)
              is evaluated instead. Y could either be array-like with
              shape = (n_samples_Y, n_features) or a list of objects.
  
          eval_gradient : bool (optional, default=False)
              Determines whether the gradient with respect to the kernel
              hyperparameter is determined. Only supported when Y is None.
  
          Returns
          -------
          K : array, shape (n_samples_X, n_samples_Y)
              Kernel k(X, Y)
  
          K_gradient : array (opt.), shape (n_samples_X, n_samples_X, n_dims)
              The gradient of the kernel k(X, X) with respect to the
              hyperparameter of the kernel. Only returned when eval_gradient
              is True.
docstring_summary: Return the kernel k(X, Y) and optionally its gradient.
docstring_tokens: Return the kernel k ( X Y ) and optionally its gradient .
function: def __call__(self, X, Y=None, eval_gradient=False):
          """Return the kernel k(X, Y) and optionally its gradient.
  
          Parameters
          ----------
          X : sequence of length n_samples_X
              Left argument of the returned kernel k(X, Y)
              Could either be array-like with shape = (n_samples_X, n_features)
              or a list of objects.
  
          Y : sequence of length n_samples_Y
              Right argument of the returned kernel k(X, Y). If None, k(X, X)
              is evaluated instead. Y could either be array-like with
              shape = (n_samples_Y, n_features) or a list of objects.
  
          eval_gradient : bool (optional, default=False)
              Determines whether the gradient with respect to the kernel
              hyperparameter is determined. Only supported when Y is None.
  
          Returns
          -------
          K : array, shape (n_samples_X, n_samples_Y)
              Kernel k(X, Y)
  
          K_gradient : array (opt.), shape (n_samples_X, n_samples_X, n_dims)
              The gradient of the kernel k(X, X) with respect to the
              hyperparameter of the kernel. Only returned when eval_gradient
              is True.
          """
          if Y is None:
              Y = X
          elif eval_gradient:
              raise ValueError("Gradient can only be evaluated when Y is None.")
  
          K = np.full((_num_samples(X), _num_samples(Y)), self.constant_value,
                      dtype=np.array(self.constant_value).dtype)
          if eval_gradient:
              if not self.hyperparameter_constant_value.fixed:
                  return (K, np.full((_num_samples(X), _num_samples(X), 1),
                                     self.constant_value,
                                     dtype=np.array(self.constant_value).dtype))
              else:
                  return K, np.empty((_num_samples(X), _num_samples(X), 0))
          else:
              return K
function_tokens: def __call__ ( self , X , Y = None , eval_gradient = False ) : if Y is None : Y = X elif eval_gradient : raise ValueError ( "Gradient can only be evaluated when Y is None." ) K = np . full ( ( _num_samples ( X ) , _num_samples ( Y ) ) , self . constant_value , dtype = np . array ( self . constant_value ) . dtype ) if eval_gradient : if not self . hyperparameter_constant_value . fixed : return ( K , np . full ( ( _num_samples ( X ) , _num_samples ( X ) , 1 ) , self . constant_value , dtype = np . array ( self . constant_value ) . dtype ) ) else : return K , np . empty ( ( _num_samples ( X ) , _num_samples ( X ) , 0 ) ) else : return K