Week 2 Exercise 5 - Assert Error - db line 9

Hi all,

I was trying to run my code for exercise 5 and kept getting an assert error for my db variable not being a float.

I fixed this error by calling my vlaue for db as a float in my variable assignment within my forward propagation function using the following:

db = np.float64(inserted my code before to compute db)

This bypassed the assertion error before as the output is now of type float and I assume 64 is the value of the data type float.

If moderators can check if this is caused by a bug please do let me know and if my code is wrong elsewhere that caused this to be needed please delete this post to not confuse others.

It is a bad idea to assume that if the test fails it is someone else’s fault. If the test fails, it means you need to understand what is wrong with your code that causes the failure. Maybe the problem is that your db value ends up being an array instead of a scalar.

Please note that we can’t see your code, so we can’t debug it for you. It might help to see the actual exception trace that you are seeing.