





from collections.abc import Callable

import numpy as np






def       _A  (      lowerCamelCase							, lowerCamelCase							, lowerCamelCase							, lowerCamelCase							, lowerCamelCase   ):
   a__	:						Any      		=  int(np.ceil((x_end - xa) / step_size   )   )
   a__	:						Any      		=  np.zeros((n + 1,)   )
   a__	:						Optional[int]      		=  ya
   a__	:						Optional[int]      		=  xa

   for k in range(snake_case__   ):
      a__	:						Optional[int]      		=  y[k] + step_size * ode_func(snake_case__							, y[k]   )
      a__	:						Any      		=  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()








from typing import TYPE_CHECKING

from ....utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available, is_vision_available


SCREAMING_SNAKE_CASE__       :			List[str]			      =						{"""configuration_van""": ["""VAN_PRETRAINED_CONFIG_ARCHIVE_MAP""", """VanConfig"""]}


try:
  if not is_torch_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  SCREAMING_SNAKE_CASE__       :			Optional[int]			      =						[
      """VAN_PRETRAINED_MODEL_ARCHIVE_LIST""",
      """VanForImageClassification""",
      """VanModel""",
      """VanPreTrainedModel""",
  ]

if TYPE_CHECKING:
  from .configuration_van import VAN_PRETRAINED_CONFIG_ARCHIVE_MAP, VanConfig

  try:
    if not is_torch_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_van import (
        VAN_PRETRAINED_MODEL_ARCHIVE_LIST,
        VanForImageClassification,
        VanModel,
        VanPreTrainedModel,
    )

else:
  import sys

  SCREAMING_SNAKE_CASE__       :			List[str]			      =						_LazyModule(__name__, globals()["""__file__"""], _import_structure)

