I have a two-row array A as follows. I want to sum the elements in the second row when the index in the first row is repeated and eventually produce a matrix as follows. I want to
I have a two-row array A as follows. I want to sum the elements in the second row when the index in the first row is repeated and eventually produce a matrix as follows. I want to