When you get a syntax error at the beginning a line, it almost always means that you have a missing close parethesis or close bracket on the previous line. Also check your indentation, although if that’s the problem the error message will usually mention that explicitly.
Yes, they give you the formula in the instructions. The only ambiguity is to realize that when they write matrices adjacent with no multiplication sign, it means “dot product”. When they mean “elementwise multiply”, they will explicitly use “*” to indicate that.
@Nahammond the error is pointing you in the right direction to solve it, check the shapes of the items you are multiplying, e.g. Y and np.log(A). Their dimensions are incorrect for a proper matrix multiplication.
Matrix multiplication rule from Wikipedia:
Also the shape of one of your elements in np.dot doesn’t look right i.e. (4,) must be wrong so check how you calculate it.