Getting error in Course 4 W1 A1

I am getting error “index 2 is out of bounds for axis 1 with size 2”. It hink something related to strides, but I am not able to understand.

Please check this thread.

I used wrong formulas for n_H and n_W, corrected the formula and my issue is resolved.
Thank you for the help!