C2_W4_Decision_Tree_with_Markdown Ex 3 - Help

Hi eveyone!

I’m on the information gain function.

I reviewed my code several times and compared it with the Hints. I don’t see what I did wrong. Seems ok to me, but I have a “nan” value issue that keeps showing up despite passing the first 3 tests

And here is the error message :

Help please… :hot_face:

Probleme solved!!

It came from a previous function.

Was really hard to find what xas going on.

So, for those who have the same problem, check that your previous functions cover all cases, especially when the lists are empty!