Logistic Regression with a Neural Network Mindset Assignment 4.2 - Initializing parameters

Hoping someone can help me understand what I’m doing wrong. I continue to get an assertion error.

{mentor edit: code removed}

dim = 2
w, b = initialize_with_zeros(dim)

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

initialize_with_zeros_test_1(initialize_with_zeros)
initialize_with_zeros_test_2(initialize_with_zeros)
AssertionError Traceback (most recent call last)
in
2 w, b = initialize_with_zeros(dim)
3
----> 4 assert type(b) == float
5 print ("w = " + str(w))
6 print ("b = " + str(b))

AssertionError:

Thanks in advance for any assistance!

‘0’ is an integer
‘0.’ is a float.

In the future, please don’t post your code on the forum. That’s not allowed by the Code of Conduct.

If a mentor needs to see your code, we’ll contact you with instructions.

so sorry. thanks!

No problem.

I’ve tried many iterations to no avail… this was just the one I posted. would you be able to point me in the direction of how this should be coded. i am not understanding.

Instead of:
b = 0
try:
b = 0.

The assert triggers if the data type of b is not ‘float’. ‘float’ means “floating point number”.