My question is a little more specific than that actually. Consider the following arrays:
from numpy import zeros, ones
array1 = ones((3, 3), bool)
array1[0][0] = 0
array1[0][2] = 0
array1[2][0] = 0
array1[2][2] = 0
array2 = zeros((12, 12), bool)
Now what I'm looking for is a way that I can refer to a 2 dimensional portion of array2 of the same proportions as array1 so that I can add the positive values from array1 to it. I know there are ways I can do this using loops, but I'd prefer to have a single statement like array2[(some way of getting a 3x3 portion of array2)] |= array1