title: Is there a way in Julia to reshape and fill the elements in row-major ways?
body: <p>I want to use Julia to reshape an array like this:</p>
  <pre><code>a = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24]
  </code></pre>
  <p>into this:</p>
  <pre><code>   a = 4*3*2 Array
   
     [[[1,  2,  3] 
       [4,  5,  6]
       [7,  8,  9]
       [10, 11, 12]
   
      [[13, 14, 15]
       [16, 17, 18]
       [19, 20, 21]
       [22, 23, 24]]
  </code></pre>
  <p>However, I don't want to use specifically a &quot;for loop&quot; to do so, any inbuilt function would be ideal for me such as reshape option. Currently, the problem I am facing with the reshape option in Julia is that it fills the elements column-wise.</p>