Gradient Checking, doubt about failed code checking on submission

I have checked the code multiple times and even re wrote the code entirely twice, but am still not able to sort this error. getting an error in the second assertion

If you get 1.0 as the check value, the mistake is probably in your final calculation:

diff = \frac{||grad - gradapprox||}{||grad|| + ||gradapprox||}

Please compare your code there and make sure you’re subtracting in the numerator and adding in the denominator. If that’s not it, then we’ll have to go to “plan B” and look at your code.

I’ve checked the formula for difference as suggested and still seem to be getting the same error. in fact it is the same one I’ve used for 1D gradient checking and it works fine there.

Please check your DMs for a message from me about the next step …

To close the loop on the public thread, we checked the code and there was a simple but hard to spot error in the calculation for theta_minus that caused the gradapprox value to end up as 0.