Fast way to calculace the average all the c grouped by (a, b) tuples from zip(a, b, c)

Published: 5/10/2017
Fast way to calculace the average all the c grouped by (a, b) tuples from zip(a, b, c)
Source: STACKOVERFLOW.COM

I have ddd as zip() of three arrays; aaa = np.array([1, 1, 1, 1, 3, 2]) bbb = np.array([10, 10, 2, 2, 3, 2]) ccc = np.array([5, 15, 9, 11, 20, 10]) ddd = zip(aaa, bbb, ccc) I would like to get average of elements in ccc grouped by the elements from aaa and bbb at the same index. In the example above, there are two ccc values where their corresponding (aaa, bbb) pair is (1, 10) , so I want the aver

Read more
Related news
Comment