





'''simple docstring'''


from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


lowerCAmelCase :					Tuple 							={
    '''configuration_jukebox''': [
        '''JUKEBOX_PRETRAINED_CONFIG_ARCHIVE_MAP''',
        '''JukeboxConfig''',
        '''JukeboxPriorConfig''',
        '''JukeboxVQVAEConfig''',
    ],
    '''tokenization_jukebox''': ['''JukeboxTokenizer'''],
}

try:
 if not is_torch_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 lowerCAmelCase :					Tuple 							=[
     '''JUKEBOX_PRETRAINED_MODEL_ARCHIVE_LIST''',
     '''JukeboxModel''',
     '''JukeboxPreTrainedModel''',
     '''JukeboxVQVAE''',
     '''JukeboxPrior''',
 ]

if TYPE_CHECKING:
 from .configuration_jukebox import (
     JUKEBOX_PRETRAINED_CONFIG_ARCHIVE_MAP,
     JukeboxConfig,
     JukeboxPriorConfig,
     JukeboxVQVAEConfig,
 )
 from .tokenization_jukebox import JukeboxTokenizer

 try:
  if not is_torch_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_jukebox import (
      JUKEBOX_PRETRAINED_MODEL_ARCHIVE_LIST,
      JukeboxModel,
      JukeboxPreTrainedModel,
      JukeboxPrior,
      JukeboxVQVAE,
  )

else:
 import sys

 lowerCAmelCase :					List[Any] 							=_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)









'''simple docstring'''


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

   for k in range(__lowerCamelCase			):
      lowercase_      :Any         =			f(__lowerCamelCase     ,y[k]			)
      lowercase_      :Optional[Any]         =			f(x + 0.5 * h     ,y[k] + 0.5 * h * ka			)
      lowercase_      :Optional[Any]         =			f(x + 0.5 * h     ,y[k] + 0.5 * h * ka			)
      lowercase_      :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()


