TypeError with lab code provided C1_W2_Linear_regression

Unable to test my code because of the lab provided code erroring out and not allowing a way to fix.

<class ‘numpy.ndarray’>

TypeError Traceback (most recent call last)
in
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

The problem is that the value returned by your compute_cost() function is the wrong type or shape.

Thanks, you’re spot on – my learning Python syntax appears to have done this!

The course makes the assumption you’re already familiar with writing code in Python. So it’s a difficult environment if you’re starting from scratch.

Fairly simple language when coming from C++ and Java, just the formatting is a bit different…

Python is heavily dependent on whitespace and indentation (not one of its more pleasant characteristics in my opinion), which catches a lot of students out.

Hello, So, how did you resolve this?