Assertion Error Week 4 Assignment


As seen I get the expected output 1.0 but there is still an assertion error? What am I missing?

I’m guessing that the assertion error is being thrown because a different test is being failed. It looks like your function is failing to return an entropy of zero when the input is an array of all ones. If the set of examples you are given are completely homogenous, then the entropy should be zero.

Thank you - any idea on why this isn’t working?


Those error messages are not helpful. I have the right output - but it tells me left should be only two elements long? I don’t see why it should be that way

Okay, problem solved, was a bug apparently. After restarting it said “All tests passed”