C1_W3 Assignment Ex. 4

Hi everyone,

On exercise 4, I am getting the correct values returned, but the test is not passing. The error is saying:

ValueError: operands could not be broadcast together with shapes (1,2) (2,5)

I know this means that W.shape is (1,1) and X.shape is (1, 30), however according to linear algebra, these matrices should be multiplicable (W Column1 and X Row1)

I’m not sure how to change X.shape to (1, 1) without ruining all the functions that come after.

Any ideas?

There are several different sizes of data set used. So never assume a fixed shape.
Your code must work with any size of data set.

Thx, it was a syntax error, all good.

1 Like