I am working in python and am loading a text file that looks like this:
3 4
5 6
7 8
9 10
I use np.loadtxt('filename.txt') and it outputs an array like this:
([[3, 4]
[5, 6]
[7, 8]
[9, 10]])
However, I want an array that looks like:
([3, 5, 7, 9], [4, 6, 8, 10])
Anyone know what I can do besides copying the array and reformatting it manually? I have tried a few things but they don't work.