class_docstr: Base class for cubic regression spline stateful transforms
  
  This class contains all the functionality for the following stateful
  transforms:
   - ``cr(x, df=None, knots=None, lower_bound=None, upper_bound=None, constraints=None)``
     for natural cubic regression spline
   - ``cc(x, df=None, knots=None, lower_bound=None, upper_bound=None, constraints=None)``
     for cyclic cubic regression spline
class_docstr_tok: ["Base","class","for","cubic","regression","spline","stateful","transforms","This","class","contains","all","the","functionality","for","the","following","stateful","transforms",":","-","``","cr","(","x",",","df=None",",","knots=None",",","lower_bound=None",",","upper_bound=None",",","constraints=None",")","``","for","natural","cubic","regression","spline","-","``","cc","(","x",",","df=None",",","knots=None",",","lower_bound=None",",","upper_bound=None",",","constraints=None",")","``","for","cyclic","cubic","regression","spline"]
code: def transform(
      self,
      x,
      df=None,
      knots=None,
      lower_bound=None,
      upper_bound=None,
      constraints=None,
  ):
      x_orig = x
      x = np.atleast_1d(x)
      if x.ndim == 2 and x.shape[1] == 1:
          x = x[:, 0]
      if x.ndim > 1:
          raise ValueError(
              "Input to %r must be 1-d, "
              "or a 2-d column vector." % (self._name,)
          )
      dm = _get_crs_dmatrix(
          x, self._all_knots, self._constraints, cyclic=self._cyclic
      )
      if have_pandas:
          if isinstance(x_orig, (pandas.Series, pandas.DataFrame)):
              dm = pandas.DataFrame(dm)
              dm.index = x_orig.index
      return dm
  
imports: import numpy
  from patsy.util import have_pandas, atleast_2d_column_default, no_pickling, assert_no_pickling, safe_string_eq
  from patsy.state import stateful_transform
label_desc: Use image node_id 4 for calling the CubicRegressionSpline obj's underlying member method code with example usage: obj.transform(x, df, knots, lower_bound, upper_bound, constraints) and returns: dm