title: Numpy python R eqivalent indexing
body: <pre><code>import numpy as np
  
  o = np.array([
  
                [
                [1,2,3,4],
                [5,6,7,8]
                ],
  
                [
                [9,10,11,12],
                [13,14,15,16]
                ]
  
               ])
  print(o.flatten())
  
  # array([ 1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16])
  </code></pre>
  
  <p>It first flattens the row of each matrix</p>
  
  <p>But I want that it flattens the coluumn of each matrix first so that it prints
  [1,5,2,6,3,7,4,8,9,13,10,14,11,15,12,16]</p>
  
  <p>I tried searching and what I found was passing "F" as an argument but that gives [1,5,9,13,2,6,10,14,3,7,11,15,4,8,12,16]
  that is it switches to another matrix without completing first.</p>
  
  <p>In short, I would like to find python equivalent of R's indexing with double brackets</p>
  
  <pre><code>someData &lt;- rep(0, 2*3*4);
  ar &lt;- array(someData, c(2, 3, 4));  
  ar[1,1,1] = 1
  ar[1,2,1] = 2
  ar[1,3,1] = 3
  
  ar[2,1,1] = 4
  ar[2,2,1] = 5
  ar[2,3,1] = 6
  
  ar[1,1,2] = 7
  ar[1,2,2] = 8
  ar[1,3,2] = 9
  print(ar[[1]]) # 1
  print(ar[[2]]) # 4
  print(ar[[3]]) # 2
  print(ar[[4]]) # 5 
  print(ar[[5]]) # 3
  print(ar[[6]]) # 6
  </code></pre>