





'''simple docstring'''






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      __A						(							a_						:  Vector      ,a_						:  Vector	):
		return np.sqrt(np.sum((np.asarray(a_	) - np.asarray(a_	)) ** 2	)	)






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


if __name__ == "__main__":






					def      __A						(							):
							from timeit import timeit

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

					benchmark()










'''simple docstring'''






from collections import namedtuple

lowerCAmelCase       		=      namedtuple("""from_to""", """from_ to""")

lowerCAmelCase       		=      {
    """cubicmeter""": from_to(1, 1),
    """litre""": from_to(0.001, 10_00),
    """kilolitre""": from_to(1, 1),
    """gallon""": from_to(0.00454, 264.172),
    """cubicyard""": from_to(0.76455, 1.30795),
    """cubicfoot""": from_to(0.028, 35.3147),
    """cup""": from_to(0.000236588, 4226.75),
}






def      __A						(							a_						:  float      ,a_						:  str      ,a_						:  str	):
		if from_type not in METRIC_CONVERSION:
				raise ValueError(
				    f'''Invalid \'from_type\' value: {from_type!r}  Supported values are:\n'''
				    + ", ".join(a_	)	)
		if to_type not in METRIC_CONVERSION:
				raise ValueError(
				    f'''Invalid \'to_type\' value: {to_type!r}.  Supported values are:\n'''
				    + ", ".join(a_	)	)
		return value * METRIC_CONVERSION[from_type].from_ * METRIC_CONVERSION[to_type].to


if __name__ == "__main__":
					import doctest

					doctest.testmod()



