Apply the logistic sigmoid 1/(1+e−x) element-wise to an array of logits without overflowing for large positive or negative values.
Implement solve(x).
Returns. Return a float NumPy array of the same shape with values in [0,1].
Example 1
Input:
solve([0.0])
Output:
[0.5]
Example 2
Input:
solve([2.0, -2.0])
Output:
[0.880797, 0.119203]
Example 3
Input:
solve([800.0, -800.0])
Output:
[1.0, 0.0]
No results yet
Run your code to check it against the examples, or submit to run every test.