




from ..utils import DummyObject, requires_backends





class     SCREAMING_SNAKE_CASE__		(metaclass=_a			):
     lowercase_ :      Any				= ["torch", "scipy"]
     def __init__(						self	:		List[Any]       ,						*__lowerCamelCase	:		Tuple       ,						**__lowerCamelCase	:		List[str]						):



       """simple docstring"""
       requires_backends(self       ,						['''torch''', '''scipy''']						)
     @classmethod
     def        A__      (						cls	:		Union[str, Any]       ,						*__lowerCamelCase	:		Dict       ,						**__lowerCamelCase	:		List[str]						):



       """simple docstring"""
       requires_backends(cls       ,						['''torch''', '''scipy''']						)



     @classmethod
     def        A__      (						cls	:		Tuple       ,						*__lowerCamelCase	:		Optional[int]       ,						**__lowerCamelCase	:		Dict						):



       """simple docstring"""
       requires_backends(cls       ,						['''torch''', '''scipy''']						)







import numpy as np
def 		a_							( __lowerCAmelCase   , __lowerCAmelCase   , __lowerCAmelCase   , __lowerCAmelCase   , __lowerCAmelCase				):
  lowerCAmelCase__										=      int(np.ceil((x_end - xa) / h				)				)
  lowerCAmelCase__										=      np.zeros((n + 1,)				)
  lowerCAmelCase__										=      ya
  lowerCAmelCase__										=      xa

  for k in range(__lowerCAmelCase				):
    lowerCAmelCase__										=      f(__lowerCAmelCase   , y[k]				)
    lowerCAmelCase__										=      f(x + 0.5 * h   , y[k] + 0.5 * h * ka				)
    lowerCAmelCase__										=      f(x + 0.5 * h   , y[k] + 0.5 * h * ka				)
    lowerCAmelCase__										=      f(x + h   , y[k] + h * ka				)
    lowerCAmelCase__										=      y[k] + (1 / 6) * h * (ka + 2 * ka + 2 * ka + ka)
    x += h

  return y


if __name__ == "__main__":
      import doctest

      doctest.testmod()

