I am trying to compute the cost using:

cost = -(1/m) * (Y * np.log(AL) + (1-Y) * np.log(1-AL))

The inputs to compute_cost method are Y and AL. But I am getting error as AssertionError: Not all tests were passed for compute_cost. Check your equations and avoid using global variables inside the function.

I even tried cost = -(1/m)*(np.multiply(Y,np.log(AL)) +np.multiply( (1-Y),np.log(1-AL))). But still I am receiving the same error.

Please help me rectify the issue.

Thanks.