






from __future__ import annotations

import typing
from collections.abc import Iterable

import numpy as np

lowerCamelCase__       		=  typing.Union[Iterable[float], Iterable[int], np.ndarray]  # noqa: UP007
lowerCamelCase__       		=  typing.Union[np.floataa, int, float]  # noqa: UP007






def 	UpperCamelCase	(							snake_case__  : Vector						,snake_case__  : Vector	):




     '''simple docstring'''






     return np.sqrt(np.sum((np.asarray(snake_case__	) - np.asarray(snake_case__	)) ** 2	)	)






def 	UpperCamelCase	(							snake_case__  : Vector						,snake_case__  : Vector	):




     '''simple docstring'''






     return sum((va - va) ** 2 for va, va in zip(snake_case__						,snake_case__	)	) ** (1 / 2)


if __name__ == "__main__":






     def 	UpperCamelCase	(							):




          '''simple docstring'''






          from timeit import timeit

          print("""Without Numpy"""	)
          print(
              timeit(
                  """euclidean_distance_no_np([1, 2, 3], [4, 5, 6])"""						,number=1_0000						,globals=globals()						,)	)
          print("""With Numpy"""	)
          print(
              timeit(
                  """euclidean_distance([1, 2, 3], [4, 5, 6])"""						,number=1_0000						,globals=globals()						,)	)



     benchmark()










def 	UpperCamelCase	(							snake_case__  : list	):




     '''simple docstring'''






     if not grid or not grid[0]:
          raise TypeError("""The grid does not contain the appropriate information"""	)

     for cell_n in range(1						,len(grid[0]	)	):
          grid[0][cell_n] += grid[0][cell_n - 1]
     __snake_case      :str 							=    grid[0]

     for row_n in range(1						,len(snake_case__	)	):
          __snake_case      :Optional[int] 							=    grid[row_n]
          __snake_case      :Optional[Any] 							=    fill_row(snake_case__						,snake_case__	)
          __snake_case      :Dict 							=    grid[row_n]

     return grid[-1][-1]






def 	UpperCamelCase	(							snake_case__  : list						,snake_case__  : list	):




     '''simple docstring'''






     current_row[0] += row_above[0]
     for cell_n in range(1						,len(snake_case__	)	):
          current_row[cell_n] += min(current_row[cell_n - 1]						,row_above[cell_n]	)

     return current_row


if __name__ == "__main__":
     import doctest

     doctest.testmod()


