C1_W3_Logistic_Regression TypeError in Cell 11

Hi, I am basically done with this course, but a TypeError in Cell 11 of this assignment is preventing me from finishing the course.

I get this error despite outputting a scalar (float) value as described in the exercise parameters, and am unsure where to go from here. I have ran all the cells from the start up to this point, and all the other exercises are working as expected for me as well.

I even substituted my code with the code provided in the hints for the exercise and still get the same error:


Please do not post your code on the forum. That’s not allowed by the Code of Conduct.

Perhaps the issue is in your sigmoid() function.

Hi, I’ve removed code written by me, but the sigmoid function passes all the unit tests and also works just fine in subsequent exercises.

Hi @Jay_S2

Try make casting to the output to float()

:man_facepalming:
That was it, thank you