


from __future__ import annotations







def SCREAMING_SNAKE_CASE	(			__lowerCAmelCase							,   __lowerCAmelCase							,   __lowerCAmelCase							,   __lowerCAmelCase				)    ->				None:
  if (direction == 1 and array[indexa] > array[indexa]) or (
      direction == 0 and array[indexa] < array[indexa]
  ):
    snake_case__				,				snake_case__						= array[indexa], array[indexa]







def SCREAMING_SNAKE_CASE	(			__lowerCAmelCase							,   __lowerCAmelCase							,   __lowerCAmelCase							,   __lowerCAmelCase				)    ->				None:
  if length > 1:
    snake_case__						= int(length / 2				)
    for i in range(__lowerCAmelCase							,   low + middle				):
      comp_and_swap(__lowerCAmelCase							,   __lowerCAmelCase							,   i + middle							,   __lowerCAmelCase				)
    bitonic_merge(__lowerCAmelCase							,   __lowerCAmelCase							,   __lowerCAmelCase							,   __lowerCAmelCase				)
    bitonic_merge(__lowerCAmelCase							,   low + middle							,   __lowerCAmelCase							,   __lowerCAmelCase				)







def SCREAMING_SNAKE_CASE	(			__lowerCAmelCase							,   __lowerCAmelCase							,   __lowerCAmelCase							,   __lowerCAmelCase				)    ->				None:
  if length > 1:
    snake_case__						= int(length / 2				)
    bitonic_sort(__lowerCAmelCase							,   __lowerCAmelCase							,   __lowerCAmelCase							,   1				)
    bitonic_sort(__lowerCAmelCase							,   low + middle							,   __lowerCAmelCase							,   0				)
    bitonic_merge(__lowerCAmelCase							,   __lowerCAmelCase							,   __lowerCAmelCase							,   __lowerCAmelCase				)


if __name__ == "__main__":
   lowerCamelCase__							:						List[str]							     =   input("""Enter numbers separated by a comma:\n""").strip()
   lowerCamelCase__							:						int							     =   [int(item.strip()) for item in user_input.split(""",""")]

   bitonic_sort(unsorted, 0, len(unsorted), 1)
   print("""\nSorted array in ascending order is: """, end="""""")
   print(*unsorted, sep=""", """)

   bitonic_merge(unsorted, 0, len(unsorted), 0)
   print("""Sorted array in descending order is: """, end="""""")
   print(*unsorted, sep=""", """)





import numpy as np







def SCREAMING_SNAKE_CASE	(			__lowerCAmelCase				)    ->				np.ndarray:
  return 1 / (1 + np.exp(-vector				))







def SCREAMING_SNAKE_CASE	(			__lowerCAmelCase				)    ->				np.ndarray:
  return vector * sigmoid(__lowerCAmelCase				)


if __name__ == "__main__":
   import doctest

   doctest.testmod()

