parameters: (theta, d)
return_statement: return r
docstring: Cubic correlation model::
  
          theta, d --> r(theta, d) =
            n
           prod max(0, 1 - 3(theta_j*d_ij)^2 + 2(theta_j*d_ij)^3) ,  i = 1,...,m
          j = 1
  
      Parameters
      ----------
      theta : array_like
          An array with shape 1 (isotropic) or n (anisotropic) giving the
          autocorrelation parameter(s).
  
      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.
docstring_summary: Cubic correlation model::
docstring_tokens: Cubic correlation model ::
function: def cubic(theta, d):
      """
      Cubic correlation model::
  
          theta, d --> r(theta, d) =
            n
           prod max(0, 1 - 3(theta_j*d_ij)^2 + 2(theta_j*d_ij)^3) ,  i = 1,...,m
          j = 1
  
      Parameters
      ----------
      theta : array_like
          An array with shape 1 (isotropic) or n (anisotropic) giving the
          autocorrelation parameter(s).
  
      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 lth == 1:
          td = np.abs(d) * theta
      elif lth != n_features:
          raise Exception("Length of theta must be 1 or " + str(n_features))
      else:
          td = np.abs(d) * theta.reshape(1, n_features)
  
      td[td > 1.] = 1.
      ss = 1. - td ** 2. * (3. - 2. * td)
      r = np.prod(ss, 1)
  
      return r
function_tokens: def cubic ( theta , d ) : 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 lth == 1 : td = np . abs ( d ) * theta elif lth != n_features : raise Exception ( "Length of theta must be 1 or " + str ( n_features ) ) else : td = np . abs ( d ) * theta . reshape ( 1 , n_features ) td [ td > 1. ] = 1. ss = 1. - td ** 2. * ( 3. - 2. * td ) r = np . prod ( ss , 1 ) return r