Course week 4 assignment 2 ex 2

It looks like the type of the costs value returned by your two_layer_model is incorrect. It must be a 0 dimensional array, but it should be a python list, right? They gave you the code to manage the costs array as part of the template, so there should have been no need to change it. If you want to get a fresh copy of the notebook to see what it originally looked like, there is a topic about that on the FAQ Thread.

You can’t modify the test cell, but I did “Insert → Cell Below” and added this code after the test cell:

print(f"type(costs) = {type(costs)}")
type(costs) = <class 'list'>

What do you see if you try that?