arange(n_states) works. I blindly followed an advice from here: http://numpy-discussion.10968.n7.nabble.com/using-numpy-argmax-to-index-into-another-array-td26387.html