I’m getting error when trying to print. The code was already generated and I’m unable to edit it.
<class 'numpy.ndarray'>
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-15-335d76763737> in <module>
5 cost = compute_cost(x_train, y_train, initial_w, initial_b)
6 print(type(cost))
----> 7 print(f'Cost at initial w: {cost:.3f}')
8
9 # Public tests
TypeError: unsupported format string passed to numpy.ndarray.__format__