Course 4 Week 1 Assignment 1 Exercise 3 - conv_forward - Index out of bound

Good evening everybody,
I’m struggling to find a solution to this error

Since I saw many had problems with slicing I printed the intervals and a_slice_prev’s shape.
I don’t understand the error and why in the last iteration a_slice_prev changes shape, if anybody could help.
Thank you in advance!

Nothing, I found the error: while defining n_H and n_W I don’t know why i divided by 2 instead of stride