title: indexing through an array in blocks
body: <p>I have an image represented as an array (img), and I'd like to make many copies of the image, and in each copy zero out different squares of the image (in the first copy zero out 0:2,0:2 in the next copy zero out 0:2, 3:5 etc). I've used np.broadcast_to to create multiple copies of the image, but I'm having trouble indexing through the multiple copies of the image, and the multiple locations within the images to zero out squares within the image.</p>
  
  <p>I think I'm looking for something like skimage.util.view_as_blocks, but I need to be able to write to the original array, not just read.</p>
  
  <p>The idea behind this is to pass all the copies of the image through a neural network. The copy that performs the worst should be the one with the class (picture) I am trying to identify in its zero'd out location.</p>
  
  <pre><code>img = np.arange(10*10).reshape(10,10)
  img_copies = np.broadcast_to(img, [100, 10, 10])
  z = np.zeros(2*2).reshape(2,2)
  </code></pre>
  
  <p>Thanks</p>