Week 2 Exercise 6 "'numpy.ndarray' object has no attribute 'append'"

But the return value from propagate is just one cost value for a particular iteration right? The costs variable is local to the optimize routine. It was initialized for you to be an empty list in the template code. You must have modified that code. If you want to get the clean copy of the notebook to compare what was there originally, there is a topic about that on the FAQ Thread.

Or maybe you gave the wrong variable name to hold the return value from the call to propagate.