Week 2 assigmnet 1 'np.ndarray' not callable

while calculating sigmoid derivative ds, ds=s(1-s),is giving me, TypeError: ‘numpy.ndarray’ object is not callable.

This is one of those cases in which python syntax is not the same as standard mathematical notation. If you say this in python:

s(1 - s)

That means that you are using s as a function and calling it with the argument (1 - s). If s is not a function, it throws an error.

If what you intended there was multiplication, the way to say that in python is:

s * (1 - s)

1 Like

Thank you. The issue is resolved…