Additional positional argument in the cost fuction

I got error below while trying to create nn_model at the exercise 8 section in week 3 Programming Assignment: Planar Data Classification with One Hidden Layer.

compute cost function does not work properly and got TypeError below.

TypeError: compute_cost() takes 2 positional arguments but 3 were given.

Is there anyone who get the same error who could help me on that?

Here is the definition of the compute_cost function:

def compute_cost(A2, Y):

So that means it takes two arguments (parameters). The error message is telling you that you invoked (called) the function with 3 arguments. So what does that function call look like in your code?

I’ve resolved the problem, thanks !!!