





from __future__ import annotations

import typing
from collections.abc import Iterable

import numpy as np

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


def        SCREAMING_SNAKE_CASE      (       _UpperCAmelCase						,	_UpperCAmelCase )			->     VectorOut:
    return np.sqrt(np.sum((np.asarray(_UpperCAmelCase ) - np.asarray(_UpperCAmelCase )) ** 2 ) )


def        SCREAMING_SNAKE_CASE      (       _UpperCAmelCase						,	_UpperCAmelCase )			->     VectorOut:
    return sum((va - va) ** 2 for va, va in zip(_UpperCAmelCase						,	_UpperCAmelCase ) ) ** (1 / 2)


if __name__ == "__main__":


    def        SCREAMING_SNAKE_CASE      (       )			->     None:
        from timeit import timeit

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


    benchmark()









from collections.abc import Sequence







def        _lowerCamelCase(	lowercase__   , lowercase__ = False	)						->	float:

		'''simple docstring'''







		if not arr:
				return 0

		__lowercase=			0 if allow_empty_subarrays else float('-inf'	)
		__lowercase=			0.0
		for num in arr:
				__lowercase=			max(0 if allow_empty_subarrays else num   , curr_sum + num	)
				__lowercase=			max(lowercase__   , lowercase__	)

		return max_sum


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

	testmod()

	lowerCAmelCase           =		[-2, 1, -3, 4, -1, 2, 1, -5, 4]
	print(F'{max_subarray_sum(nums) = }')






