




"""simple docstring"""







from collections.abc import Callable

import numpy as np





def 							lowercase					(snake_case__   : Callable      ,       snake_case__   : float      ,       snake_case__   : float      ,       snake_case__   : float      ,       snake_case__   : float )     ->  np.array:


				'''simple docstring'''






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

				for k in range(snake_case__ ):
								lowerCAmelCase  =				y[k] + step_size * ode_func(snake_case__      ,       y[k] )
								lowerCAmelCase  =				y[k] + (
								    (step_size / 2) * (ode_func(snake_case__      ,       y[k] ) + ode_func(x + step_size      ,       snake_case__ ))
								)
								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_torch_available


a      =							{
    'configuration_time_series_transformer': [
        'TIME_SERIES_TRANSFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP',
        'TimeSeriesTransformerConfig',
    ],
}

try:
		if not is_torch_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		a      =							[
		    'TIME_SERIES_TRANSFORMER_PRETRAINED_MODEL_ARCHIVE_LIST',
		    'TimeSeriesTransformerForPrediction',
		    'TimeSeriesTransformerModel',
		    'TimeSeriesTransformerPreTrainedModel',
		]


if TYPE_CHECKING:
		from .configuration_time_series_transformer import (
		    TIME_SERIES_TRANSFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP,
		    TimeSeriesTransformerConfig,
		)

		try:
				if not is_torch_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_time_series_transformer import (
				    TIME_SERIES_TRANSFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
				    TimeSeriesTransformerForPrediction,
				    TimeSeriesTransformerModel,
				    TimeSeriesTransformerPreTrainedModel,
				)

else:
		import sys

		a      =							_LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)





