
'''simple docstring'''



from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


__A								=			{
    "configuration_clipseg": [
        "CLIPSEG_PRETRAINED_CONFIG_ARCHIVE_MAP",
        "CLIPSegConfig",
        "CLIPSegTextConfig",
        "CLIPSegVisionConfig",
    ],
    "processing_clipseg": ["CLIPSegProcessor"],
}

try:
				if not is_torch_available():
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				pass
else:
				__A								=			[
				    "CLIPSEG_PRETRAINED_MODEL_ARCHIVE_LIST",
				    "CLIPSegModel",
				    "CLIPSegPreTrainedModel",
				    "CLIPSegTextModel",
				    "CLIPSegVisionModel",
				    "CLIPSegForImageSegmentation",
				]

if TYPE_CHECKING:
				from .configuration_clipseg import (
				    CLIPSEG_PRETRAINED_CONFIG_ARCHIVE_MAP,
				    CLIPSegConfig,
				    CLIPSegTextConfig,
				    CLIPSegVisionConfig,
				)
				from .processing_clipseg import CLIPSegProcessor

				try:
								if not is_torch_available():
												raise OptionalDependencyNotAvailable()
				except OptionalDependencyNotAvailable:
								pass
				else:
								from .modeling_clipseg import (
								    CLIPSEG_PRETRAINED_MODEL_ARCHIVE_LIST,
								    CLIPSegForImageSegmentation,
								    CLIPSegModel,
								    CLIPSegPreTrainedModel,
								    CLIPSegTextModel,
								    CLIPSegVisionModel,
								)

else:
				import sys

				__A								=			_LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)











"""simple docstring"""
from collections.abc import Callable

import numpy as np

def       _snake_case						(						UpperCamelCase						:		Callable			,		UpperCamelCase						:		float			,		UpperCamelCase						:		float			,		UpperCamelCase						:		float			,		UpperCamelCase						:		float						):
 UpperCAmelCase	:					Any	=	int(np.ceil((x_end - xa) / step_size						)						)
 UpperCAmelCase	:					Optional[Any]	=	np.zeros((n + 1,)						)
 UpperCAmelCase	:					Optional[int]	=	ya
 UpperCAmelCase	:					int	=	xa

 for k in range(UpperCamelCase						):
  UpperCAmelCase	:					Optional[int]	=	y[k] + step_size * ode_func(UpperCamelCase			,		y[k]						)
  UpperCAmelCase	:					Optional[int]	=	y[k] + (
      (step_size / 2) * (ode_func(UpperCamelCase			,		y[k]						) + ode_func(x + step_size			,		UpperCamelCase						))
  )
  x += step_size

 return y


if __name__ == "__main__":
      import doctest

      doctest.testmod()
