I have a big 2d bitewise array (0s and 1s only) and a small one (3x3).
I want to see where the big array matches the small one, i.e. i
, j
for which
big_array[i-1:i+2, j-1:j+2] == small_array
There could be more than one (i,j)
that satisfies the condition. How do I do this without writing a double nested i
, j
loop?