





'''simple docstring'''

from collections.abc import Callable

import numpy as np

def     __magic_name__							(				__UpperCAmelCase				,						__UpperCAmelCase				,						__UpperCAmelCase				,						__UpperCAmelCase				,						__UpperCAmelCase   )    ->       np.ndarray:

   '''simple docstring'''







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

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

   return y


if __name__ == "__main__":
    import doctest

    doctest.testmod()













"""simple docstring"""





def 	lowerCamelCase__			(				_lowerCamelCase			:						list[list[int | float]]					) ->							int:
  lowerCamelCase_       	=		len(_lowerCamelCase					)
  lowerCamelCase_       	=		len(matrix[0]					)
  lowerCamelCase_       	=		min(_lowerCamelCase						,							_lowerCamelCase					)

  for row in range(_lowerCamelCase					):
    # Check if diagonal element is not zero
    if matrix[row][row] != 0:
      # Eliminate all the elements below the diagonal
      for col in range(row + 1						,							_lowerCamelCase					):
        lowerCamelCase_       	=		matrix[col][row] / matrix[row][row]
        for i in range(_lowerCamelCase						,							_lowerCamelCase					):
          matrix[col][i] -= multiplier * matrix[row][i]
    else:
      # Find a non-zero diagonal element to swap rows
      lowerCamelCase_       	=		True
      for i in range(row + 1						,							_lowerCamelCase					):
        if matrix[i][row] != 0:
          lowerCamelCase_	,      lowerCamelCase_       	=		matrix[i], matrix[row]
          lowerCamelCase_       	=		False
          break
      if reduce:
        rank -= 1
        for i in range(_lowerCamelCase					):
          lowerCamelCase_       	=		matrix[i][rank]

            # Reduce the row pointer by one to stay on the same row
      row -= 1

  return rank


if __name__ == "__main__":
  import doctest

  doctest.testmod()




