pmdarima.utils.check_endog
- pmdarima.utils.check_endog(y, dtype=<class 'numpy.float64'>, copy=True, force_all_finite=False, preserve_series=True)[source][source]
Wrapper for
check_arrayandcolumn_or_1dfrom sklearn- Parameters:
- yarray-like, shape=(n_samples,)
The 1d endogenous array.
- dtypestring, type or None (default=np.float64)
Data type of result. If None, the dtype of the input is preserved. If “numeric”, dtype is preserved unless array.dtype is object.
- copybool, optional (default=False)
Whether a forced copy will be triggered. If copy=False, a copy might still be triggered by a conversion.
- force_all_finitebool, optional (default=False)
Whether to raise an error on np.inf and np.nan in an array. The possibilities are:
True: Force all values of array to be finite.
False: accept both np.inf and np.nan in array.
- preserve_seriesbool, optional
Whether to preserve a
pd.Seriesobject. Will also attempt to squeeze a dataframe into apd.Series.
- Returns:
- ynp.ndarray or pd.Series, shape=(n_samples,)
A 1d numpy ndarray