# Path: torchdiffeq/_impl/misc.py
# def _handle_unused_kwargs(solver, unused_kwargs):
#     if len(unused_kwargs) > 0:
#         warnings.warn('{}: Unexpected arguments {}'.format(solver.__class__.__name__, unused_kwargs))


import abc
import torch
from scipy.integrate import solve_ivp
from .misc import _handle_unused_kwargs


class ScipyWrapperODESolver(metaclass=abc.ABCMeta):

    def __init__(self, func, y0, rtol, atol, solver="LSODA", **unused_kwargs):
        unused_kwargs.pop('norm', None)
        unused_kwargs.pop('grid_points', None)
        unused_kwargs.pop('eps', None)
        _handle_unused_kwargs(self, unused_kwargs)
        del unused_kwargs


# Path: torchdiffeq/_impl/misc.py
# def _handle_unused_kwargs(solver, unused_kwargs):
#     if len(unused_kwargs) > 0:
#         warnings.warn('{}: Unexpected arguments {}'.format(solver.__class__.__name__, unused_kwargs))


# Path: torchdiffeq/_impl/scipy_wrapper.py
import abc
import torch
from scipy.integrate import solve_ivp
from .misc import _handle_unused_kwargs



class ScipyWrapperODESolver(metaclass=abc.ABCMeta):

    def __init__(self, func, y0, rtol, atol, solver="LSODA", **unused_kwargs):
        unused_kwargs.pop('norm', None)
        unused_kwargs.pop('grid_points', None)
        unused_kwargs.pop('eps', None)
        _handle_unused_kwargs(self, unused_kwargs)
        del unused_kwargs


        self.dtype = y0.dtype