C2_W4_Decision_Tree Practice Lab error when Submitting

Hi mentors,

I’ve tried every known fix for Cell #7 in the C2_W4 Decision Tree lab, including:

  • Correct logic for compute_entropy() using Coursera’s own hints
  • Testing output for [0, 1] → returns 1.0
  • Early return structure, float-safe comparisons, len(y) == 0 handling

Still getting this error (see attached screenshot).

Any suggestions?
Thank you!