I want to use Julia to reshape an array like this:
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]
into this:
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]]
However, I don't want to use specifically a "for loop" 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.