title: Why are 3D numpy arrays printed the way they are (How are they ordered)?
body: <p>I am trying to wrap my head around 3D arrays (or multi-dimensional arrays in general), but it's blowing my brains a bit. Especially the way in which 3D numpy arrays are printed is counter-intuitive to me. This question is <a href="https://stackoverflow.com/questions/22981845/3-dimensional-array-in-numpy">similar</a> but it is more about the differences between programming languages, and I still do not fully get it.  Let me try to explain. </p>
  
  <p>Say I want to create a 3D array with 3 rows (length), 5 columns(width) and 2 depth. So a 3x5x2 matrix. </p>
  
  <p>I do the following: </p>
  
  <pre><code>import numpy as np
  a = np.zeros(30).reshape(3, 5, 2)
  </code></pre>
  
  <p>To me, a logical way to print this would be like this:</p>
  
  <pre><code>[[[0. 0. 0. 0. 0.]  #We can still see three rows from top to bottom
    [0. 0. 0. 0. 0.]] #We can still see five columns from left to right
  
   [[0. 0. 0. 0. 0.]  #Depth values are shown underneath each other
    [0. 0. 0. 0. 0.]] 
  
   [[0. 0. 0. 0. 0.]
    [0. 0. 0. 0. 0.]]]
  </code></pre>
  
  <p>However, when I print this array it prints like this:</p>
  
  <pre><code>[[[0. 0.] #We can still see three rows from top to bottom,
    [0. 0.] #However columns now also appear from top to bottom instead of from left to right
    [0. 0.] #Depth values are now shown from left to right
    [0. 0.]
    [0. 0.]]
  
   [[0. 0.]
    [0. 0.]
    [0. 0.]
    [0. 0.]
    [0. 0.]]
  
   [[0. 0.]
    [0. 0.]
    [0. 0.]
    [0. 0.]
    [0. 0.]]]
  </code></pre>
  
  <p>It is unobvious to me why the array would be printed in this way. Maybe it is just me (Maybe my spatial reasoning is lacking here), or is there a specific reason why NumPy arrays are printed like this? </p>