{moderator edit: code images removed}
Hi @Virinchi_Motupalli, Welcome to the community!
In your function compute_cost, the square difference between predicted outcome and actual outcome should be (f_wb - y[i])**2
for each single example but you are computing square difference (f_wb - y)**2
with whole y array element-wise resulting the cost variable numpy array.
Best Regards,
Mujassim
thank you sir for pointing out my error
Please don’t post your code on the forums. That isn’t allowed by the Honor Code.
I will edit the thread to remove the code.