part_matrix_to_vector: Convert a partition matrix to a vector
Description
For each row in a partition matrix, this function gets the column index for which the row is equal to one.
That is, for row i, this function returns the index of the row entry that is equal to one.