I have a matrix having the form:
a=[[1 0 0 0 0],
[0 0 1 0 0],
[0 1 0 0 0],
[0 0 0 1 0],
[0 0 0 0 1]]
and I would like to conver the vector a in a matrix having the form:
b=[[0],[2],[1],[3],[4]]
So basically, I would like to convert the binary matrix into an integer matrix which entries correspond to the index/position of "1" in the a matrix.
Do you have any idea how it works in python?