Assertion error: in Logistic_Regression_with_a_Neural_Network_mindset exercise got stuck up

Hello all,
I encounter this error
AssertionError Traceback (most recent call last)
2 w, b = initialize_with_zeros(dim)
----> 4 assert type(b) == float
5 print ("w = " + str(w))
6 print ("b = " + str(b))


thats occuring in
assert type(b) == float
print ("w = " + str(w))
print ("b = " + str(b))

Code cannot be edited, so I’m unable to rectify the error and proceed. Please help

Is your b is integer, like b= 0 ? if so, you should use float For example, 2 in an integer and 2. or (2.0) is a float.


Yep thank you I’v just figured it out, initialized b=0.0, it worked!!! Thanks for your quick response anyway :+1:

It’s great to hear that you found the answer. Just for future reference, the lesson here is that if the test fails, the solution is not to change the test. It is to figure out what is wrong with your code that causes the test to fail.

felicitaciones por tu aporte a la comunidad!