# Not all tests were passed for {}

**URL:** <https://community.deeplearning.ai/t/not-all-tests-were-passed-for/24526>\
**Category:** Neural Networks and Deep Learning\
**Tags:** coursera-platform\
**Created:** [August 1, 2021, 10:24am UTC](https://community.deeplearning.ai/t/not-all-tests-were-passed-for/24526 "2021-08-01T10:24:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![silver6wings](https://avatars.discourse-cdn.com/v4/letter/s/c67d28/32.png) [@silver6wings](https://community.deeplearning.ai/u/silver6wings)\
**Post date:** [August 1, 2021, 10:24am UTC](https://community.deeplearning.ai/t/not-all-tests-were-passed-for/24526/1 "2021-08-01T10:24:38Z")

</div>

In the Python Basic with Numpy homework  
I got AssertionError: Not all tests were passed for sigmoid. Check your equations and avoid using global variables inside the function.

What happened to 1 line code?  
def sigmoid(x):  
“”"  
Compute the sigmoid of x

```
Arguments:
x -- A scalar or numpy array of any size

Return:
s -- sigmoid(x)
"""

# (≈ 1 line of code)
# YOUR CODE STARTS HERE

s = 1 / (1 + np.exp(-x))

# YOUR CODE ENDS HERE

return np.exp(x)
```

---

<div class="post-metadata">

**Author:** ![sammykyu](https://avatars.discourse-cdn.com/v4/letter/s/43a26b/32.png) [@sammykyu](https://community.deeplearning.ai/u/sammykyu)\
**Post date:** [August 3, 2021, 2:28am UTC](https://community.deeplearning.ai/t/not-all-tests-were-passed-for/24526/2 "2021-08-03T02:28:47Z")

</div>

Your “1 line of code” is correct, but it looks like you also modified the returned value which is incorrect.

---

<div class="post-metadata">

**Author:** ![silver6wings](https://avatars.discourse-cdn.com/v4/letter/s/c67d28/32.png) [@silver6wings](https://community.deeplearning.ai/u/silver6wings)\
**Post date:** [August 4, 2021, 2:42pm UTC](https://community.deeplearning.ai/t/not-all-tests-were-passed-for/24526/3 "2021-08-04T14:42:04Z")

</div>

oh, I got it, my mistake now it got passed, Thanks you ：）
