test: Add two testcases in sigmid.py

This commit is contained in:
Ronald Ngounou 2024-10-06 02:03:32 -04:00
parent adda95ea58
commit 17264a496b

View File

@ -29,6 +29,12 @@ def sigmoid(vector: np.ndarray) -> np.ndarray:
>>> sigmoid(np.array([0.0]))
array([0.5])
>>> sigmoid(np.array([100.0]))
array([1.])
>>> sigmoid(np.array([-100.0]))
array([3.72007598e-44])
"""
return 1 / (1 + np.exp(-vector))