def _preprocess_for_cut(x):
x_is_series = isinstance(x, Series)<EOL>series_index = None<EOL>name = None<EOL>if x_is_series:<EOL><INDENT>series_index = x.index<EOL>name = x.name<EOL><DEDENT>ndim = getattr(x, '<STR_LIT>', None)<EOL>if ndim is None:<EOL><INDENT>x = np.asarray(x)<EOL><DEDENT>if x.ndim != <NUM_LIT:1>:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>return x_is_series, series_index, name, x<EOL>
handles preprocessing for cut where we convert passed
input to array, strip the index information and store it
separately