What is the best way to make this One Hot encoded matrix
array([[[1, 0, 0],
[1, 0, 0],
[0, 1, 0]],
[[0, 0, 1],
[0, 1, 0],
[1, 0, 0]]])
as
array([[0, 0, 1],
[2, 1, 0]])
In other words, how to decode One Hot array?