How can I have sums of an a array based on the unique values of an b array, assuming both have same dimension and shape?
In other words, I expect to have an output consisting of the sums of array b for each value of array a. (In the example below: sum for value 1 = xxx, sum for value 2 = yyy... sum for value 11 = zzz)
a = [[ 5 1 10 11 6]
[ 5 3 8 10 9]
[ 2 1 10 8 7]
[ 7 10 7 8 11]
[10 10 3 0 11]]
b = [[508 220 316 557 737]
[625 419 161 736 426]
[389 608 760 885 232]
[396 309 522 204 842]
[403 831 225 549 797]]