code: def check_1d(inp):
      
      if isinstance(inp, list):
          return check_1d(np.array(inp))
      if isinstance(inp, np.ndarray):
          if inp.ndim == 1: # input is a vector
              return inp
docs: Check input to be a vector. Converts lists to np.ndarray.
  
      Parameters
      ----------
      inp : obj
          Input vector
  
      Returns
      -------
      numpy.ndarray or None
          Input vector or None
  
      Examples
      --------
      >>> check_1d([0, 1, 2, 3])
      [0, 1, 2, 3]
  
      >>> check_1d('test')
      None