as the title suggests it seems that the automated test is expecting wrong values for the final practice lab of the course 1 MLS.
The expected values inside the notebook (didn’t edit) are of shape (2,) and align with what I’ve got. Also that part of the practice lab is working with 2 features so it’s unlikely that the gradient will have a shape of (3,).
I’m also posting a picture of the automated test output.
Welcome to the community. The expected values mentioned in the markdown cell are in accordance with the test mentioned in the code cell in the notebook (the one shown by you), whereas, the “AssertionError” message shows the expected values in accordance with the unit tests, which you can find in the public_tests.py file. You can find the instructions for opening this and other related files in the following thread.
This suggests that your implementation is slightly incorrect. I guess that you have hard-coded the value of n, i.e., the number of features, but it might be something else as well. Please go through your implementation carefully, correct it, and then re-run the test cell. It would run perfectly fine. I hope this helps.