class_docstr: Transformation for linear constraints `R params = q`
  
  Note, the transformation from the reduced to the full parameters is an
  affine and not a linear transformation if q is not zero.
  
  
  Parameters
  ----------
  R : array_like
      Linear restriction matrix
  q : arraylike or None
      values of the linear restrictions
  
  
  Notes
  -----
  The reduced parameters are not sorted with respect to constraints.
  
  TODO: error checking, eg. inconsistent constraints, how?
  
  Inconsistent constraints will raise an exception in the calculation of
  the constant or offset. However, homogeneous constraints, where q=0, will
  can have a solution where the relevant parameters are constraint to be
  zero, as in the following example::
  
      b1 + b2 = 0 and b1 + 2*b2 = 0, implies that b2 = 0.
  
  The transformation applied from full to reduced parameter space does not
  raise and exception if the constraint does not hold.
  TODO: maybe change this, what's the behavior in this case?
  
  
  The `reduce` transform is applied to the array of explanatory variables,
  `exog`, when transforming a linear model to impose the constraints.
docstr: transform from the reduced to the full parameter space
  
  Parameters
  ----------
  params_reduced : array_like
      parameters in the transformed space
  
  Returns
  -------
  params : array_like
      parameters in the original space
  
  Notes
  -----
  If the restriction is not homogeneous, i.e. q is not equal to zero,
  then this is an affine transform.
docstr_tok: ["transform","from","the","reduced","to","the","full","parameter","space","Parameters","--","--","--","--","--","params_reduced",":","array_like","parameters","in","the","transformed","space","Returns","--","--","--","-","params",":","array_like","parameters","in","the","original","space","Notes","--","--","-","If","the","restriction","is","not","homogeneous",",","i.e",".","q","is","not","equal","to","zero",",","then","this","is","an","affine","transform","."]
code: def expand(self, params_reduced):
      """transform from the reduced to the full parameter space
  
      Parameters
      ----------
      params_reduced : array_like
          parameters in the transformed space
  
      Returns
      -------
      params : array_like
          parameters in the original space
  
      Notes
      -----
      If the restriction is not homogeneous, i.e. q is not equal to zero,
      then this is an affine transform.
      """
      params_reduced = np.asarray(params_reduced)
      return self.transf_mat.dot(params_reduced.T).T + self.constant
  
file_path: statsmodels/statsmodels/base/_constraints.py
imports: import numpy
label_desc: Use image node_id 2 for calling the TransformRestriction obj's underlying member method code with example usage: obj.expand(params_reduced) and returns: unknown