UNQ_C10 example failed, but unit test came out correct

Hi, as the title said, I caught a very strange bug. The example code of UNQ_C10 failed due to vector shapes

but the unit test is somehow passed?

Strange, isn’t it? Maybe it’s something with the dataset, I guess?

Hi @trhgquan

Passing unit tests does not guarantee that you will pass Assignment. Unit tests help catching errors early but it is hard to catch every error. So my guess is that for one of your functions the unit tests failed to catch the incorrect vector shapes. It is hard to guess which function unit test failed to do that by just looking at the screen-shot but my guess would be to check pred shape.

1 Like

I figure it out. get_matrices does not return np.array matrices, instead it returns a np.matrix. That’s why each column of X_val is not in (n,) shape but now (1, n).

Problem solved :smiley: