code: def data2groupcont(x1, x2):
      """create dummy continuous variable
  
      Parameters
      ----------
      x1 : 1d array
          label or group array
      x2 : 1d array (float)
          continuous variable
  
      Notes
      -----
      useful for group specific slope coefficients in regression
      """
      if x2.ndim == 1:
          x2 = x2[:, None]
      dummy = data2dummy(x1, returnall=True)
      return dummy * x2
  
file_path: statsmodels/statsmodels/sandbox/regression/ols_anova_original.py
imports: import numpy
  import numpy.lib.recfunctions
  from statsmodels.compat.python import lmap
  from statsmodels.regression.linear_model import OLS
label_desc: Use image node_id 3 for calling a global function with example usage: data2groupcont(x1, x2) and returns: unknown