C2 W1 A3: Help my code is correct but i keep getting this error

TypeError Traceback (most recent call last)
in
3 cost, cache = forward_propagation_n(X, Y, parameters)
4 gradients = backward_propagation_n(X, Y, cache)
----> 5 difference = gradient_check_n(parameters, gradients, X, Y, 1e-7, True)
6 expected_values = [0.2850931567761623, 1.1890913024229996e-07]
7 assert not(type(difference) == np.ndarray), “You are not using np.linalg.norm for numerator or denominator”

TypeError: gradient_check_n() takes from 4 to 5 positional arguments but 6 were given , THIS IS THE ERROR BUT it appears in the cell where I can’t edit

and this is my code I can’t find anything wrong with it

# GRADED FUNCTION: gradient_check_n

def gradient_check_n(parameters, gradients, X, Y, epsilon=1e-7):

    # moderator edit: code removed - not allowed by the Code of Conduct

Hi,
Welcome to the course.

A reminder, please do not post your code on the forum. That’s not allowed by the Code of Conduct.

If a mentor needs to see your code, we’ll contact you with instructions.

I’ll remove the code from this thread, and provide some hints.

Please stand by…

1 Like

TypeError: gradient_check_n() takes from 4 to 5 positional arguments but 6 were given

Here’s the problem:

Your function definition has five parameters, but the master copy of the notebook in the course repo has the six I marked above.

It seems you may have deleted one of the arguments in your notebook.

1 Like

Sorry this is my first time using it so I didn’t know

Thank you so much , I will try to re write my code by editing this

No problem!