An example of what I'm doing:
Given:
[1,2,3;
2,2,2;
2,4,4;
3,1,1;
3,3,3]
Output:
[1,2,3;
2,3,3;
3,2,2]
So that the output array has unique values in the first column, the values in the other columns being the average of the rows with the same value in the first column.
The code I have right now is this:
Is there a simpler way to do this?