





'''simple docstring'''

from __future__ import annotations

import typing
from collections.abc import Iterable

import numpy as np

__lowerCAmelCase							:	List[str]			=typing.Union[Iterable[float], Iterable[int], np.ndarray]  # noqa: UP007
__lowerCAmelCase							:	List[Any]			=typing.Union[np.floataa, int, float]  # noqa: UP007





def 						UpperCamelCase				(							_lowerCamelCase					:					Vector						,       _lowerCamelCase					:					Vector       ):
    return np.sqrt(np.sum((np.asarray(_lowerCamelCase       ) - np.asarray(_lowerCamelCase       )) ** 2       )       )





def 						UpperCamelCase				(							_lowerCamelCase					:					Vector						,       _lowerCamelCase					:					Vector       ):
    return sum((va - va) ** 2 for va, va in zip(_lowerCamelCase						,       _lowerCamelCase       )       ) ** (1 / 2)


if __name__ == "__main__":





  def 						UpperCamelCase				(							):
      from timeit import timeit

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



  benchmark()










'''simple docstring'''

import warnings


warnings.warn(
    "memory_utils has been reorganized to utils.memory. Import `find_executable_batchsize` from the main `__init__`: "
    "`from accelerate import find_executable_batch_size` to avoid this warning.",
    FutureWarning,
)



