






from __future__ import annotations

import typing
from collections.abc import Iterable

import numpy as np

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






def      _snake_case     (__lowercase     ,   __lowercase):
   return np.sqrt(np.sum((np.asarray(__lowercase) - np.asarray(__lowercase)) ** 2))






def      _snake_case     (__lowercase     ,   __lowercase):
   return sum((va - va) ** 2 for va, va in zip(__lowercase     ,   __lowercase)) ** (1 / 2)


if __name__ == "__main__":






 def      _snake_case     ():
    from timeit import timeit

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

 benchmark()











from __future__ import annotations





def        __UpperCAmelCase						(							lowerCamelCase_ :     list[float]  )       ->  float:







			"""simple docstring"""





			SCREAMING_SNAKE_CASE_   : Tuple					  =      0.0_0
			SCREAMING_SNAKE_CASE_   : Tuple					  =      0
			for resistor in resistors:
						if resistor <= 0:
									SCREAMING_SNAKE_CASE_   : Optional[Any]					  =      F'Resistor at index {index} has a negative or zero value!'
									raise ValueError(lowerCamelCase_  )
						first_sum += 1 / float(lowerCamelCase_  )
						index += 1
			return 1 / first_sum





def        __UpperCAmelCase						(							lowerCamelCase_ :     list[float]  )       ->  float:







			"""simple docstring"""





			SCREAMING_SNAKE_CASE_   : Dict					  =      0.0_0
			SCREAMING_SNAKE_CASE_   : Union[str, Any]					  =      0
			for resistor in resistors:
						sum_r += resistor
						if resistor < 0:
									SCREAMING_SNAKE_CASE_   : Union[str, Any]					  =      F'Resistor at index {index} has a negative value!'
									raise ValueError(lowerCamelCase_  )
						index += 1
			return sum_r


if __name__ == "__main__":
						import doctest

						doctest.testmod()



