






import numpy as np






def 							lowerCamelCase__ (       __lowerCamelCase     :	Optional[Any]    ,						__lowerCamelCase     :	Any    ,						__lowerCamelCase     :	Dict    ,						__lowerCamelCase     :	int    ,						__lowerCamelCase     :	List[Any]						):
  __UpperCAmelCase				:      Tuple	 =    int(np.ceil((x_end - xa) / h						)						)
  __UpperCAmelCase				:      List[str]	 =    np.zeros((n + 1,)						)
  __UpperCAmelCase				:      Tuple	 =    ya
  __UpperCAmelCase				:      Optional[Any]	 =    xa

  for k in range(UpperCamelCase__						):
    __UpperCAmelCase				:      Union[str, Any]	 =    f(UpperCamelCase__    ,						y[k]						)
    __UpperCAmelCase				:      str	 =    f(x + 0.5 * h    ,						y[k] + 0.5 * h * ka						)
    __UpperCAmelCase				:      int	 =    f(x + 0.5 * h    ,						y[k] + 0.5 * h * ka						)
    __UpperCAmelCase				:      Tuple	 =    f(x + h    ,						y[k] + h * ka						)
    __UpperCAmelCase				:      Any	 =    y[k] + (1 / 6) * h * (ka + 2 * ka + 2 * ka + ka)
    x += h

  return y


if __name__ == "__main__":
       import doctest

       doctest.testmod()






_lowercase							:   Dict						=						"0.21.0"

from .accelerator import Accelerator
from .big_modeling import (
    cpu_offload,
    cpu_offload_with_hook,
    disk_offload,
    dispatch_model,
    init_empty_weights,
    init_on_device,
    load_checkpoint_and_dispatch,
)
from .data_loader import skip_first_batches
from .launchers import debug_launcher, notebook_launcher
from .state import PartialState
from .utils import (
    DeepSpeedPlugin,
    DistributedDataParallelKwargs,
    DistributedType,
    FullyShardedDataParallelPlugin,
    GradScalerKwargs,
    InitProcessGroupKwargs,
    find_executable_batch_size,
    infer_auto_device_map,
    is_rich_available,
    load_checkpoint_in_model,
    synchronize_rng_states,
)


if is_rich_available():
				from .utils import rich



