title: Creating a 4D view on 2D array to divide it into cells of fixed size
body: <p>I have a 2D array <code>t</code> in numpy:</p>
  
  <pre><code>&gt;&gt;&gt; t = numpy.array(range(81)).reshape((9,9))
  &gt;&gt;&gt; t
  array([[ 0,  1,  2,  3,  4,  5,  6,  7,  8],
         [ 9, 10, 11, 12, 13, 14, 15, 16, 17],
         [18, 19, 20, 21, 22, 23, 24, 25, 26],
         [27, 28, 29, 30, 31, 32, 33, 34, 35],
         [36, 37, 38, 39, 40, 41, 42, 43, 44],
         [45, 46, 47, 48, 49, 50, 51, 52, 53],
         [54, 55, 56, 57, 58, 59, 60, 61, 62],
         [63, 64, 65, 66, 67, 68, 69, 70, 71],
         [72, 73, 74, 75, 76, 77, 78, 79, 80]])
  </code></pre>
  
  <p>It is indexed by two numbers: row and column index.</p>
  
  <pre><code>&gt;&gt;&gt; t[2,3]
  21
  &gt;&gt;&gt; t.shape
  (9, 9)
  &gt;&gt;&gt; t.strides
  (72, 8)
  </code></pre>
  
  <p>What I want to do is to <strong>divide the array into rectangular cells of fixed size</strong>, 3×3 for example. I'd like to avoid memory copying. The way I try to achieve this is creating a <em>view</em> onto <code>t</code> with correspondent shape and strides (<code>(3,3,3,3)</code> and <code>(216,24,72,8)</code> respectively). This way the first two indexes of the view would mean the position of 3×3 cell in the larger grid and the last two would mean the position of element inside the cell. For example, <code>t[0,1,:,:]</code> would return</p>
  
  <pre><code>array([[ 3,  4,  5],
         [12, 13, 14],
         [21, 22, 23]])
  </code></pre>
  
  <p>So my question is — how to create the described view? Am I missing a simpler method? Can this be done elegantly with slicing syntax?</p>