


from ..utils import DummyObject, requires_backends



class 				A       (			metaclass=UpperCAmelCase__				):
					'''simple docstring'''






					A__     =					['''torch''', '''transformers''', '''onnx''']

					def __init__(self       :		str ,   *_UpperCAmelCase       :		Tuple ,   **_UpperCAmelCase       :		Optional[int]						)		->  Optional[Any]:




							"""simple docstring"""


							requires_backends(self ,   ["""torch""", """transformers""", """onnx"""]						)

					@classmethod
					def     lowerCamelCase__	(cls       :		str ,   *_UpperCAmelCase       :		List[Any] ,   **_UpperCAmelCase       :		Optional[int]						)		->  Optional[Any]:




							"""simple docstring"""


							requires_backends(cls ,   ["""torch""", """transformers""", """onnx"""]						)


					@classmethod
					def     lowerCamelCase__	(cls       :		Tuple ,   *_UpperCAmelCase       :		int ,   **_UpperCAmelCase       :		Tuple						)		->  Optional[int]:




							"""simple docstring"""


							requires_backends(cls ,   ["""torch""", """transformers""", """onnx"""]						)






class 				A       (			metaclass=UpperCAmelCase__				):
					'''simple docstring'''






					A__     =					['''torch''', '''transformers''', '''onnx''']

					def __init__(self       :		Optional[int] ,   *_UpperCAmelCase       :		int ,   **_UpperCAmelCase       :		Optional[int]						)		->  Union[str, Any]:




							"""simple docstring"""


							requires_backends(self ,   ["""torch""", """transformers""", """onnx"""]						)

					@classmethod
					def     lowerCamelCase__	(cls       :		Optional[Any] ,   *_UpperCAmelCase       :		Tuple ,   **_UpperCAmelCase       :		int						)		->  Tuple:




							"""simple docstring"""


							requires_backends(cls ,   ["""torch""", """transformers""", """onnx"""]						)


					@classmethod
					def     lowerCamelCase__	(cls       :		str ,   *_UpperCAmelCase       :		Dict ,   **_UpperCAmelCase       :		Any						)		->  int:




							"""simple docstring"""


							requires_backends(cls ,   ["""torch""", """transformers""", """onnx"""]						)






class 				A       (			metaclass=UpperCAmelCase__				):
					'''simple docstring'''






					A__     =					['''torch''', '''transformers''', '''onnx''']

					def __init__(self       :		Any ,   *_UpperCAmelCase       :		Tuple ,   **_UpperCAmelCase       :		Tuple						)		->  int:




							"""simple docstring"""


							requires_backends(self ,   ["""torch""", """transformers""", """onnx"""]						)

					@classmethod
					def     lowerCamelCase__	(cls       :		Union[str, Any] ,   *_UpperCAmelCase       :		str ,   **_UpperCAmelCase       :		Union[str, Any]						)		->  Union[str, Any]:




							"""simple docstring"""


							requires_backends(cls ,   ["""torch""", """transformers""", """onnx"""]						)


					@classmethod
					def     lowerCamelCase__	(cls       :		Any ,   *_UpperCAmelCase       :		Tuple ,   **_UpperCAmelCase       :		Union[str, Any]						)		->  Union[str, Any]:




							"""simple docstring"""


							requires_backends(cls ,   ["""torch""", """transformers""", """onnx"""]						)






class 				A       (			metaclass=UpperCAmelCase__				):
					'''simple docstring'''






					A__     =					['''torch''', '''transformers''', '''onnx''']

					def __init__(self       :		Dict ,   *_UpperCAmelCase       :		Optional[int] ,   **_UpperCAmelCase       :		List[str]						)		->  Dict:




							"""simple docstring"""


							requires_backends(self ,   ["""torch""", """transformers""", """onnx"""]						)

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




							"""simple docstring"""


							requires_backends(cls ,   ["""torch""", """transformers""", """onnx"""]						)


					@classmethod
					def     lowerCamelCase__	(cls       :		Optional[int] ,   *_UpperCAmelCase       :		Optional[int] ,   **_UpperCAmelCase       :		Union[str, Any]						)		->  Tuple:




							"""simple docstring"""


							requires_backends(cls ,   ["""torch""", """transformers""", """onnx"""]						)






class 				A       (			metaclass=UpperCAmelCase__				):
					'''simple docstring'''






					A__     =					['''torch''', '''transformers''', '''onnx''']

					def __init__(self       :		List[Any] ,   *_UpperCAmelCase       :		Optional[int] ,   **_UpperCAmelCase       :		Tuple						)		->  Dict:




							"""simple docstring"""


							requires_backends(self ,   ["""torch""", """transformers""", """onnx"""]						)

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




							"""simple docstring"""


							requires_backends(cls ,   ["""torch""", """transformers""", """onnx"""]						)


					@classmethod
					def     lowerCamelCase__	(cls       :		Optional[int] ,   *_UpperCAmelCase       :		Optional[Any] ,   **_UpperCAmelCase       :		List[str]						)		->  List[str]:




							"""simple docstring"""


							requires_backends(cls ,   ["""torch""", """transformers""", """onnx"""]						)






class 				A       (			metaclass=UpperCAmelCase__				):
					'''simple docstring'''






					A__     =					['''torch''', '''transformers''', '''onnx''']

					def __init__(self       :		Optional[int] ,   *_UpperCAmelCase       :		Tuple ,   **_UpperCAmelCase       :		Union[str, Any]						)		->  Optional[Any]:




							"""simple docstring"""


							requires_backends(self ,   ["""torch""", """transformers""", """onnx"""]						)

					@classmethod
					def     lowerCamelCase__	(cls       :		Union[str, Any] ,   *_UpperCAmelCase       :		Tuple ,   **_UpperCAmelCase       :		Optional[Any]						)		->  Any:




							"""simple docstring"""


							requires_backends(cls ,   ["""torch""", """transformers""", """onnx"""]						)


					@classmethod
					def     lowerCamelCase__	(cls       :		Tuple ,   *_UpperCAmelCase       :		List[str] ,   **_UpperCAmelCase       :		Union[str, Any]						)		->  Optional[Any]:




							"""simple docstring"""


							requires_backends(cls ,   ["""torch""", """transformers""", """onnx"""]						)





"""simple docstring"""






from collections.abc import Callable

import numpy as np





def 				A_       ( snake_case__       ,					snake_case__       ,					snake_case__       ,					snake_case__       ,					snake_case__		)					->  np.ndarray:
			_UpperCamelCase					:str					     =	int(np.ceil((x_end - xa) / step_size		)		)
			_UpperCamelCase					:Union[str, Any]					     =	np.zeros((n + 1,)		)
			_UpperCamelCase					:List[str]					     =	ya
			_UpperCamelCase					:Any					     =	xa

			for k in range(snake_case__		):
						_UpperCamelCase					:Union[str, Any]					     =	y[k] + step_size * ode_func(snake_case__       ,					y[k]		)
						x += step_size

			return y


if __name__ == "__main__":
					import doctest

					doctest.testmod()

