SyntaxError: invalid syntax

Is there any Synatx error here? dw = (1 / m) * np.dot(X, np(A-Y).T

Yes, dw = (1 / m) * np.dot(X, np(A-Y).T

What is the np(A-Y) doing here? Also you need to close np.dot()!

Thanks. I solved it.

1 Like

Always count the sets of parenthesis.

Also note that the notebook editor is “syntax aware”: just click on a paren or bracket and it will highlight the matching one. Or not! :scream_cat: