parameters: (x)
return_statement: return x
docstring: handles preprocessing for cut where we convert passed
      input to array, strip the index information and store it
      separately
docstring_summary: handles preprocessing for cut where we convert passed
      input to array, strip the index information and store it
      separately
docstring_tokens: handles preprocessing for cut where we convert passed input to array strip the index information and store it separately
function: def _preprocess_for_cut(x):
      """
      handles preprocessing for cut where we convert passed
      input to array, strip the index information and store it
      separately
      """
  
      # Check that the passed array is a Pandas or Numpy object
      # We don't want to strip away a Pandas data-type here (e.g. datetimetz)
      ndim = getattr(x, "ndim", None)
      if ndim is None:
          x = np.asarray(x)
      if x.ndim != 1:
          raise ValueError("Input array must be 1 dimensional")
  
      return x
function_tokens: def _preprocess_for_cut ( x ) : # Check that the passed array is a Pandas or Numpy object # We don't want to strip away a Pandas data-type here (e.g. datetimetz) ndim = getattr ( x , "ndim" , None ) if ndim is None : x = np . asarray ( x ) if x . ndim != 1 : raise ValueError ( "Input array must be 1 dimensional" ) return x