I have a [? 5 5] array: (?=3 in this case)
[[[ 0 1 2 3 4]
[ 5 6 7 8 9]
[10 11 12 13 14]
[15 16 17 18 19]
[20 21 22 23 24]]
[[25 26 27 28 29]
[30 31 32 33 34]
[35 36 37 38 39]
[40 41 42 43 44]
[45 46 47 48 49]]
[[50 51 52 53 54]
[55 56 57 58 59]
[60 61 62 63 64]
[65 66 67 68 69]
[70 71 72 73 74]]]
I want to have 5 (the # of row) separate array have (? 5) like this:
[array([[ 0, 1, 2, 3, 4],
[25, 26, 27, 28, 29],
[50, 51, 52, 53, 54]]),
array([[ 5, 6, 7, 8, 9],
[30, 31, 32, 33, 34],
[55, 56, 57, 58, 59]]),
array([[10, 11, 12, 13, 14],
[35, 36, 37, 38, 39],
[60, 61, 62, 63, 64]]),
array([[15, 16, 17, 18, 19],
[40, 41, 42, 43, 44],
[65, 66, 67, 68, 69]]),
array([[20, 21, 22, 23, 24],
[45, 46, 47, 48, 49],
[70, 71, 72, 73, 74]])]
Is this a simple preferably one/two numpy operation way to do this?
Numpy array [3 5 5] to [5 3 5]or...to 5x [3 5]to make it more useful to others. Apparently the wordtransposeis not obvious to everybody looking at multidimensional data for the first time, so this is where the value in keeping this question would be. Otherwise I'm sure this would be a duplicate to other existingtransposequestions.reorder dimensions of numpy array?