title: Iterating over the last dimensions of a numpy array
body: <p>Consider the following snippet:</p>
  
  <pre><code>a = np.ones((2,2,2,2,2))
  for example in a:
      for row in example:
          for col in row:
              for box in col:
                  print (box.shape)
  </code></pre>
  
  <p>Having so many nested <code>for</code>s makes for some very ugly code.</p>
  
  <p>How can I get the same effect with only one explicit iteration?</p>