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

import numpy as np



def  __lowerCamelCase       (      _UpperCamelCase  :  Callable							,    _UpperCamelCase  :  float							,    _UpperCamelCase  :  float							,    _UpperCamelCase  :  float							,    _UpperCamelCase  :  float					):


      '''simple docstring'''


      UpperCAmelCase_            =  int(np.ceil((x_end - xa) / step_size					)					)
      UpperCAmelCase_            =  np.zeros((n + 1,)					)
      UpperCAmelCase_            =  ya
      UpperCAmelCase_            =  xa

      for k in range(_UpperCamelCase					):
            UpperCAmelCase_            =  y[k] + step_size * ode_func(_UpperCamelCase							,    y[k]					)
            x += step_size

      return y


if __name__ == "__main__":
      import doctest

      doctest.testmod()






'''simple docstring'''
from datetime import datetime

import matplotlib.pyplot as plt
import torch



def  __lowerCamelCase       (      _UpperCamelCase  :  Union[str, Any]					):


      '''simple docstring'''


      for param in module.parameters():
            UpperCAmelCase_            =  False



def  __lowerCamelCase       (      ):


      '''simple docstring'''


      UpperCAmelCase_            =  '''cuda''' if torch.cuda.is_available() else '''cpu'''
      if torch.backends.mps.is_available() and torch.backends.mps.is_built():
            UpperCAmelCase_            =  '''mps'''
      if device == "mps":
            print(
                '''WARNING: MPS currently doesn\'t seem to work, and messes up backpropagation without any visible torch'''
                ''' errors. I recommend using CUDA on a colab notebook or CPU instead if you\'re facing inexplicable issues'''
                ''' with generations.'''					)
      return device



def  __lowerCamelCase       (      _UpperCamelCase  :  Union[str, Any]					):


      '''simple docstring'''


      UpperCAmelCase_            =  plt.imshow(_UpperCamelCase					)
      fig.axes.get_xaxis().set_visible(_UpperCamelCase					)
      fig.axes.get_yaxis().set_visible(_UpperCamelCase					)
      plt.show()





def  __lowerCamelCase       (      ):


      '''simple docstring'''


      UpperCAmelCase_            =  datetime.now()
      UpperCAmelCase_            =  current_time.strftime('''%H:%M:%S'''					)
      return timestamp





