

from functools import lru_cache


@lru_cache
def        __lowerCAmelCase    (       _UpperCamelCase		:  int	)		->							int:
 '''simple docstring'''


 if num < 0:
  raise ValueError('Number should not be negative.'	)

 return 1 if num in (0, 1) else num * factorial(num - 1	)


if __name__ == "__main__":
      import doctest

      doctest.testmod()




import numpy as np


def        __lowerCAmelCase    (       _UpperCamelCase		:  np.ndarray	)		->							np.ndarray:
 '''simple docstring'''


 return 1 / (1 + np.exp(-vector	))


def        __lowerCAmelCase    (       _UpperCamelCase		:  np.ndarray	)		->							np.ndarray:
 '''simple docstring'''


 return vector * sigmoid(_UpperCamelCase	)


if __name__ == "__main__":
      import doctest

      doctest.testmod()

