

"""simple docstring"""


def    a__   (   __SCREAMING_SNAKE_CASE			)     ->     float:
		if not nums:  # Makes sure that the list is not empty
				raise ValueError("List is empty"			)

		__lowerCAmelCase:	Optional[int]   				=      sum(__SCREAMING_SNAKE_CASE			) / len(__SCREAMING_SNAKE_CASE			)  # Calculate the average
		return sum(abs(x - average			) for x in nums			) / len(__SCREAMING_SNAKE_CASE			)


if __name__ == "__main__":
			import doctest

			doctest.testmod()





"""simple docstring"""


import numpy as np






def    a__   (   __SCREAMING_SNAKE_CASE			)     ->     np.array:
		return (2 / (1 + np.exp(-2 * vector			))) - 1


if __name__ == "__main__":
			import doctest

			doctest.testmod()


