code: def as_matrix(x):
      """Converts array to matrix
  
      Parameters
      ----------
      x : np.ndarray
          Array
  
      Returns
      -------
      np.ndarray
          A two dimensional array
  
      Raises
      ------
      ValueError
          If the input has more than two dimensions
      """
      x = np.atleast_1d(x)
      if x.ndim == 1:
          return x[:, np.newaxis]
      elif x.ndim > 2:
          raise ValueError("'x.ndim' cannot be > 2")
      return x
  
file_path: bambi/bambi/transformations.py
imports: import numpy
  import pandas
  from formulae.transforms import register_stateful_transform
label_desc: Use image node_id 6 for calling a global function with example usage: as_matrix(x) and returns: x, x