Grading error in week 4 coding assignment

C1W4 programming assignment in this course.
In exercise 3, (The data centering one) after running the code cells, it is showing that all the test cases have passed. But, upon submission, I am getting zero marks in that part. Any idea what could be going wrong?
For reference, this is my solution to that exercise 3:
image removed as it contains grade function codes which assess your assignment grade. This would be considered violation of Code of conduct l. if a mentor wants to see your code, they will ask you to send codes by Personal DM.

And this is the comment I’m getting upon submission:
There was a problem grading your submission. Details:
cannot reshape array of size 220 into shape (55,4096)

Any sort of help is extremely appreciated!! Thanks in advance

That type of error usually means that you are “hard-coding” assumptions about the dimensions of the input objects. That is a mistake. What if the grader test case uses different sized objects?

We always want to write general code here. So how could you write this code without any hard-coded dimensions?

1 Like

Oh thank you so much!! I fixed it and it worked!

1 Like