


'''simple docstring'''



from __future__ import annotations

import typing
from collections.abc import Iterable

import numpy as np

A__						:   Dict				=    typing.Union[Iterable[float], Iterable[int], np.ndarray]  # noqa: UP007
A__						:   Optional[Any]				=    typing.Union[np.floataa, int, float]  # noqa: UP007



def      UpperCAmelCase__   (      UpperCAmelCase_       :							Vector ,       UpperCAmelCase_       :							Vector				)	->						VectorOut:
     return np.sqrt(np.sum((np.asarray(UpperCAmelCase_				) - np.asarray(UpperCAmelCase_				)) ** 2				)				)



def      UpperCAmelCase__   (      UpperCAmelCase_       :							Vector ,       UpperCAmelCase_       :							Vector				)	->						VectorOut:
     return sum((va - va) ** 2 for va, va in zip(UpperCAmelCase_ ,       UpperCAmelCase_				)				) ** (1 / 2)


if __name__ == "__main__":



      def      UpperCAmelCase__   (      )	->						None:
           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'''

def 					__UpperCamelCase				(						lowercase__    :	list[int]			):






     '''simple docstring'''





     if not nums:  # Makes sure that the list is not empty
          raise ValueError('List is empty'			)

     __lowercase      		=sum(lowercase__			) / len(lowercase__			)  # Calculate the average
     return sum(abs(x - average			) for x in nums			) / len(lowercase__			)


if __name__ == "__main__":
       import doctest

       doctest.testmod()


