parameters: (self, values: ArrayLike)
return_statement: return values
docstring: Convert input to numpy arrays for Cython routines
docstring_summary: Convert input to numpy arrays for Cython routines
docstring_tokens: Convert input to numpy arrays for Cython routines
function: def _prep_values(self, values: ArrayLike) -> np.ndarray:
          """Convert input to numpy arrays for Cython routines"""
          if needs_i8_conversion(values.dtype):
              raise NotImplementedError(
                  f"ops for {type(self).__name__} for this "
                  f"dtype {values.dtype} are not implemented"
              )
          else:
              # GH #12373 : rolling functions error on float32 data
              # make sure the data is coerced to float64
              try:
                  values = ensure_float64(values)
              except (ValueError, TypeError) as err:
                  raise TypeError(f"cannot handle this type -> {values.dtype}") from err
  
          # Convert inf to nan for C funcs
          inf = np.isinf(values)
          if inf.any():
              values = np.where(inf, np.nan, values)
  
          # error: Incompatible return value type (got "Optional[ndarray]",
          # expected "ndarray")
          return values
function_tokens: def _prep_values ( self , values : ArrayLike ) -> np . ndarray : if needs_i8_conversion ( values . dtype ) : raise NotImplementedError ( f"ops for {type(self).__name__} for this " f"dtype {values.dtype} are not implemented" ) else : # GH #12373 : rolling functions error on float32 data # make sure the data is coerced to float64 try : values = ensure_float64 ( values ) except ( ValueError , TypeError ) as err : raise TypeError ( f"cannot handle this type -> {values.dtype}" ) from err # Convert inf to nan for C funcs inf = np . isinf ( values ) if inf . any ( ) : values = np . where ( inf , np . nan , values ) # error: Incompatible return value type (got "Optional[ndarray]", # expected "ndarray") return values