I have this array in python:
([[0., 0., 1.],
[0., 0., 1.],
[0., 0., 1.],
[0., 0., 1.],
[0., 1., 0.],
[0., 1., 0.],
[1., 0., 0.],
[1., 0., 0.],
[1., 0., 0.],
[1., 0., 0.]])
How to go about converting this 10 x 3 array to a 10 x 1 array with the single array being equal to the column number where there is a 1 in the row. This output in this example case should be:
([2,2,2,2,1,1,0,0,0,0], dtype=int64)
Any help will be greatly appreciated as to how to do this in python. Thank you!