Index 4 is out of bounds for axis 1 with size 3

Hello, I am stuck with this from a lot time and can’t figure out how to solve this issue. Any help would be appreciated.

The most likely problem is in your code for a_slice_prev.

Please edit your message and remove the code. That breaks the course Honor Code.

Your method for vert start and horiz start is wrong. You need to use the stride variable to get the correct index values to use in a_slice_prev.

Search the forum for other posts about this function.

Also your code for a_prev_pad is wrong.
And the for loop range is wrong.

I have rectified my code but i am getting this error right now

Thank you for your help. I figured out the issue and passed the test