Suppose I have the following array:
print(my_array)
(array([[[[5, 7, 3, 1],
[-6, 0, -8, -2],
[ 9 -7, -5, -9],
[-1, 6, 0, 1],
[-7, -8 , -3, 4]]],
[[[-1, 5, -2, 2],
[4, -3, -1, 2],
[-9, 0, 7, 1],
[-4, 6, -5, -8],
[-7, -3, 0 , 1]]]]),
array([[[[ 7, 9 , 4, -3 ],
[-4, 7, -1, -9],
[6, 0, -3, -7],
[ 1, 6, 9, -3],
[-4, -1, -9 , -6]]],
[[[ 0, 8, 2, 6],
[4, 5, 1, 2],
[3, 7, 5, 2],
[6, -1, 9, 5],
[ 0, 5, 7, 7]]]]))
Then I want to form four new arrays, where the first new array is created from first columns of all nested arrays in my_array, the second from second columns etc.. such that
A = array([5,-6,9,-1,-7,-1,4,-9,-4,-7,7,-4,6,1,-4,0,4,3,6,0])
And the second array formed by second columns of each nested, like so:
B = array([7,0,-7,6,-8,5,-3,0,6,-3,9,7,0,6,-1,8,5,7,-1,5])
How can I do this?