



"""simple docstring"""






from collections.abc import Callable

import numpy as np






def 					snake_case__       (		__lowerCamelCase    :   str							,		__lowerCamelCase    :   Optional[int]							,		__lowerCamelCase    :   List[Any]							,		__lowerCamelCase    :   Optional[Any]							,		__lowerCamelCase    :   List[str]     ):
			"""simple docstring"""
			lowerCamelCase__		:		Dict		     =int(np.ceil((x_end - xa) / step_size     )     )
			lowerCamelCase__		:		Optional[Any]		     =np.zeros((n + 1,)     )
			lowerCamelCase__		:		Optional[int]		     =ya
			lowerCamelCase__		:		Union[str, Any]		     =xa

			for k in range(_lowercase     ):
						lowerCamelCase__		:		Any		     =y[k] + step_size * ode_func(_lowercase							,		y[k]     )
						x += step_size

			return y


if __name__ == "__main__":
		import doctest

		doctest.testmod()









"""simple docstring"""






from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_sentencepiece_available,
    is_speech_available,
    is_torch_available,
)


_lowercase			:			Any										=						{
    "configuration_trocr": ["TROCR_PRETRAINED_CONFIG_ARCHIVE_MAP", "TrOCRConfig"],
    "processing_trocr": ["TrOCRProcessor"],
}


try:
		if not is_torch_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		_lowercase			:			List[Any]										=						[
		    "TROCR_PRETRAINED_MODEL_ARCHIVE_LIST",
		    "TrOCRForCausalLM",
		    "TrOCRPreTrainedModel",
		]


if TYPE_CHECKING:
		from .configuration_trocr import TROCR_PRETRAINED_CONFIG_ARCHIVE_MAP, TrOCRConfig
		from .processing_trocr import TrOCRProcessor

		try:
				if not is_torch_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_trocr import TROCR_PRETRAINED_MODEL_ARCHIVE_LIST, TrOCRForCausalLM, TrOCRPreTrainedModel

else:
		import sys

		_lowercase			:			Tuple										=						_LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)




