Week 2 programing: Python Basics with Numpy

if anyone can help find out why i met same error for all my exercise? with error:
““Not all tests were passed for sigmoid. Check your equations and avoid using global variables inside the function.””

i didn’t note i have any global value in the function! was this due to the test function?? how should i fix it ? T T

That is not the correct implementation of sigmoid. What you wrote is the equivalent of saying:

sigmoid(z) = e^z

Have another look at the mathematical formula for sigmoid that was given in the instructions. It’s a bit more complicated than that, right? :nerd_face: When they said “use np.exp”, they didn’t mean that was the complete answer.

Also note that you filed this question under “General Discussions”. Generally you’ll get quicker responses if you file things under the relevant course categories. These forums cover a lot of different courses at this point. I moved it for you to DLS Course 1 by using the little “Edit Pencil” on the title of your thread.

thanks so much, i got it now. :grinning: