






"""simple docstring"""




from collections.abc import Callable

import numpy as np






def        lowerCAmelCase (      UpperCamelCase_:							Callable     , UpperCamelCase_:							float     , UpperCamelCase_:							float     , UpperCamelCase_:							float     , UpperCamelCase_:							float	)       ->							Tuple:







  '''simple docstring'''







  _a							=	int(np.ceil((x_end - xa) / step_size	)	)
  _a							=	np.zeros((n + 1,)	)
  _a							=	ya
  _a							=	xa

  for k in range(UpperCamelCase_	):
    _a							=	y[k] + step_size * ode_func(UpperCamelCase_     , y[k]	)
    _a							=	y[k] + (
        (step_size / 2) * (ode_func(UpperCamelCase_     , y[k]	) + ode_func(x + step_size     , UpperCamelCase_	))
    )
    x += step_size

  return y


if __name__ == "__main__":
     import doctest

     doctest.testmod()










"""simple docstring"""




from ..utils import DummyObject, requires_backends




class    lowercase_    (metaclass=_UpperCAmelCase     ):
      A__	:		Any       			=				['''torch''', '''torchsde''']






      def __init__(    self     ,     *a_     ,     **a_	)	->Optional[int]:







        '''simple docstring'''


        requires_backends(self     ,     ["torch", "torchsde"]	)






      @classmethod
      def 			lowerCamelCase__    (    cls     ,     *a_     ,     **a_	)	->List[Any]:







        '''simple docstring'''


        requires_backends(cls     ,     ["torch", "torchsde"]	)






      @classmethod
      def 			lowerCamelCase__    (    cls     ,     *a_     ,     **a_	)	->str:







        '''simple docstring'''


        requires_backends(cls     ,     ["torch", "torchsde"]	)


