parameters: (fun, y0, support_complex)
return_statement: return fun_wrapped, y0
docstring: Helper function for checking arguments common to all solvers.
docstring_summary: Helper function for checking arguments common to all solvers.
docstring_tokens: Helper function for checking arguments common to all solvers .
function: def check_arguments(fun, y0, support_complex):
      """Helper function for checking arguments common to all solvers."""
      y0 = np.asarray(y0)
      if np.issubdtype(y0.dtype, np.complexfloating):
          if not support_complex:
              raise ValueError("`y0` is complex, but the chosen solver does "
                               "not support integration in a complex domain.")
          dtype = complex
      else:
          dtype = float
      y0 = y0.astype(dtype, copy=False)
  
      if y0.ndim != 1:
          raise ValueError("`y0` must be 1-dimensional.")
  
      def fun_wrapped(t, y):
          return np.asarray(fun(t, y), dtype=dtype)
  
      return fun_wrapped, y0
function_tokens: def check_arguments ( fun , y0 , support_complex ) : y0 = np . asarray ( y0 ) if np . issubdtype ( y0 . dtype , np . complexfloating ) : if not support_complex : raise ValueError ( "`y0` is complex, but the chosen solver does " "not support integration in a complex domain." ) dtype = complex else : dtype = float y0 = y0 . astype ( dtype , copy = False ) if y0 . ndim != 1 : raise ValueError ( "`y0` must be 1-dimensional." ) def fun_wrapped ( t , y ) : return np . asarray ( fun ( t , y ) , dtype = dtype ) return fun_wrapped , y0