The function is working without error but it is not matching the test case. I guess there is something wrong with the seeds.
More likely there is something wrong with your code.
I did not have any problem with the “seeds” here and was able to get the tests to pass. As Tom says, there must be an error in your code. Please show us the output of the failing test case for starters.
As the mentors have mentioned, the seeds might not be the main issue here. There’s more likely a subtle error in the code itself. If the problem persists, feel free to share the specific output of the failing test case and any relevant parts of your code.
Thanks for the reply, everyone. I found the error. I defined the input array with shape (100,) rather than (100,1). The bias is of shape (100,1).
As a test example consider this:
a1 = np.zeros((100,))
a2 = np.zeros((100,1))
print((a1+a2).shape) ## answer is (100,100)
I redefined my input arrays to shape (100,1) and everything worked well.
Good catch!
Python indexing has some very subtle nuances.