From 17264a496b8a749b9b4768924379f566de2d911f Mon Sep 17 00:00:00 2001 From: Ronald Ngounou <74538524+ronaldngounou@users.noreply.github.com> Date: Sun, 6 Oct 2024 02:03:32 -0400 Subject: [PATCH] test: Add two testcases in sigmid.py --- maths/sigmoid.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maths/sigmoid.py b/maths/sigmoid.py index cb45bde27..29902ff2c 100644 --- a/maths/sigmoid.py +++ b/maths/sigmoid.py @@ -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))