I wrote the equation given but it says valueErroe
{moderator edit - solution code removed}
It is fine to use np.dot
to compute the cost, but you need to understand how dot products work. It doesn’t make sense to dot a 1 x 3 vector with a 1 x 3 vector, right? For dot product to work, the “inner” dimensions need to match. So how could you get that to work? Are you familiar with the “transpose” operation?
This question comes up frequently. Here’s an earlier thread that discusses it in more detail.
thank for your helping.