C2W1 Gradient check / Exercise_4

Hi, Mike.

Welcome to the DLS series. One minor point is that you filed this under “General Discussion”. This Discourse forum supports I think about 5 different specializations at this point with more being added all the time, so you’re a lot more likely to have your question noticed by the right people if you file it under the relevant category. I went ahead and moved it for you by using the “pencil” edit icon on the title.

I’ve never seen this error before. I looked at that function, which is defined in the file testCases.py that gets imported by the first cell in the notebook. The function gradient_check_n_test_case legitimately does not take any arguments, so the only way I can explain that error message is that one of the following must have happened:

  1. You modified the function definition by editing the file testCases.py. If so, that’s not a good idea. You can get back the original by deleting the file and then doing the “Get Fresh Copy” procedure documented on the FAQ Thread.

  2. You accidentally modified the function definition for gradient_check_n in the notebook itself (which actually does have those positional parameters) so that you changed the name of the function to gradient_check_n_test_case instead. If that’s the case, please change it back and see what happens.

If neither of the above explain things, then please let us know.