Test not passed but previous all passed

In the Logistic Regression Home work:
I got models using all test pass functions but got failure, what is the reason?

w, b = initialize_with_zeros(X_train.shape[0])
params, grads, costs = optimize(w, b, X_train, Y_train)
w = params[“w”]
b = params[“b”]
Y_prediction_test = predict(w, b, X_test)
Y_prediction_train = predict(w, b, X_train)

Don’t know for sure what is going on, but b should be float, not a array like it is in your code.

I found the root cause, it is this line, parameters missed.
optimize(w, b, X_train, Y_train, num_iterations, learning_rate, print_cost = False)
Now I got all passed

Nice. I wouldn’t have guessed that. num_iterations, learning_rate, print_cost have predefined values in case the user don’t provide them. So it should work fine even when they are missing.