code: def generalized_exponential(theta, d):
      """
      Generalized exponential correlation model.
      (Useful when one does not know the smoothness of the function to be
      predicted.)::
  
                                            n
          theta, d --> r(theta, d) = exp(  sum  - theta_i * |d_i|^p )
                                          i = 1
  
      Parameters
      ----------
      theta : array_like
          An array with shape 1+1 (isotropic) or n+1 (anisotropic) giving the
          autocorrelation parameter(s) (theta, p).
  
      d : array_like
          An array with shape (n_eval, n_features) giving the componentwise
          distances between locations x and x' at which the correlation model
          should be evaluated.
  
      Returns
      -------
      r : array_like
          An array with shape (n_eval, ) with the values of the autocorrelation
          model.
      """
  
      theta = np.asarray(theta, dtype=np.float64)
      d = np.asarray(d, dtype=np.float64)
  
      if d.ndim > 1:
          n_features = d.shape[1]
      else:
          n_features = 1
  
      lth = theta.size
      if n_features > 1 and lth == 2:
          theta = np.hstack([np.repeat(theta[0], n_features), theta[1]])
      elif lth != n_features + 1:
          raise Exception(
              "Length of theta must be 2 or %s" % (n_features + 1)
          )
      else:
          theta = theta.reshape(1, lth)
  
      td = (
          theta[:, 0:-1].reshape(1, n_features)
          * np.abs(d) ** theta[:, -1]
      )
      r = np.exp(-np.sum(td, 1))
  
      return r
  
imports: import numpy
label_desc: Use image node_id 3 for calling a global function with example usage: generalized_exponential(theta, d) and returns: r