



'''simple docstring'''



from __future__ import annotations

import typing
from collections.abc import Iterable

import numpy as np

lowerCAmelCase_  :							Tuple             =    typing.Union[Iterable[float], Iterable[int], np.ndarray]  # noqa: UP007
lowerCAmelCase_  :							Optional[Any]             =    typing.Union[np.floataa, int, float]  # noqa: UP007
def        UpperCAmelCase (    A	:					Vector       ,		A	:					Vector					):
							return np.sqrt(np.sum((np.asarray(A					) - np.asarray(A					)) ** 2					)					)
def        UpperCAmelCase (    A	:					Vector       ,		A	:					Vector					):
							return sum((va - va) ** 2 for va, va in zip(A       ,		A					)					) ** (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=10000       ,		globals=globals()       ,		)					)
														print('''With Numpy'''					)
														print(
														    timeit(
														        '''euclidean_distance([1, 2, 3], [4, 5, 6])'''       ,		number=10000       ,		globals=globals()       ,		)					)






							benchmark()









'''simple docstring'''



from __future__ import annotations
def        UpperCAmelCase (    A	:					list[int]       ,		A	:					int					):
							if len(A					) < k or k < 0:
														raise ValueError('''Invalid Input'''					)
							SCREAMING_SNAKE_CASE       :   Dict         =      sum(array[:k]					)
							for i in range(len(A					) - k					):
														SCREAMING_SNAKE_CASE       :   Optional[Any]         =      current_sum - array[i] + array[i + k]
														SCREAMING_SNAKE_CASE       :   Union[str, Any]         =      max(A       ,		A					)
							return max_sum


if __name__ == "__main__":
							from doctest import testmod
							from random import randint

							testmod()
							lowerCAmelCase_  :							Optional[int]             =    [randint(-1000, 1000) for i in range(100)]
							lowerCAmelCase_  :							Optional[int]             =    randint(0, 110)
							print(f'The maximum sum of {k} consecutive elements is {max_sum_in_array(array,k)}')




