

from typing import Callable, Optional

from .. import Features
from ..packaged_modules.generator.generator import Generator
from .abc import AbstractDatasetInputStream


class 				SCREAMING_SNAKE_CASE__ (__snake_case					):





    def __init__(				self						,       a						,       a = None						,       a = None						,       a = False						,       a = False						,       a = None						,       a = None						,       **a						,       ):
         super().__init__(
             features=a						,       cache_dir=a						,       keep_in_memory=a						,       streaming=a						,       num_proc=a						,       **a						,       )
         lowercase__   :       int				=	Generator(
             cache_dir=a						,       features=a						,       generator=a						,       gen_kwargs=a						,       **a						,       )





    def 				snake_case_    (				self):
         # Build iterable dataset
         if self.streaming:
              lowercase__   :       List[Any]				=	self.builder.as_streaming_dataset(split='train')
         # Build regular (map-style) dataset
         else:
              lowercase__   :       Union[str, Any]				=	None
              lowercase__   :       Optional[Any]				=	None
              lowercase__   :       List[str]				=	None
              lowercase__   :       Optional[int]				=	None

              self.builder.download_and_prepare(
                  download_config=a						,       download_mode=a						,       verification_mode=a						,       base_path=a						,       num_proc=self.num_proc						,       )
              lowercase__   :       Union[str, Any]				=	self.builder.as_dataset(
                  split='train'						,       verification_mode=a						,       in_memory=self.keep_in_memory)
         return dataset




import numpy as np

def      snake_case__      (   SCREAMING_SNAKE_CASE_		:   str     ,					SCREAMING_SNAKE_CASE_		:   Optional[int]     ,					SCREAMING_SNAKE_CASE_		:   Optional[int]     ,					SCREAMING_SNAKE_CASE_		:   Union[str, Any]     ,					SCREAMING_SNAKE_CASE_		:   List[Any]      ):



     '''simple docstring'''





     lowercase__   :       List[Any]				=	int(np.ceil((x_end - xa) / h      )      )
     lowercase__   :       Dict				=	np.zeros((n + 1,)      )
     lowercase__   :       Dict				=	ya
     lowercase__   :       Union[str, Any]				=	xa

     for k in range(SCREAMING_SNAKE_CASE_      ):
          lowercase__   :       Optional[int]				=	f(SCREAMING_SNAKE_CASE_     ,					y[k]      )
          lowercase__   :       Dict				=	f(x + 0.5 * h     ,					y[k] + 0.5 * h * ka      )
          lowercase__   :       Any				=	f(x + 0.5 * h     ,					y[k] + 0.5 * h * ka      )
          lowercase__   :       List[Any]				=	f(x + h     ,					y[k] + h * ka      )
          lowercase__   :       Tuple				=	y[k] + (1 / 6) * h * (ka + 2 * ka + 2 * ka + ka)
          x += h

     return y


if __name__ == "__main__":
       import doctest

       doctest.testmod()

