ids = np.array([[1, 1, 1, 2, 2], [1, 1, 2, 2, 5], [1, 1, 2, 5, 5], [1, 2, 2,
    5, 5], [2, 2, 5, 5, 5]])
values = np.array([[14.8, 17.0, 74.3, 40.3, 90.2], [25.2, 75.9, 5.6, 40.0, 
    33.7], [78.9, 39.3, 11.3, 63.6, 56.7], [11.4, 75.7, 78.4, 88.7, 58.6],
    [79.6, 32.3, 35.3, 52.5, 13.3]])
for i in np.unique(ids):
    mask = ids == i
count = np.sum(mask)
total = np.sum(values[mask])
print('{}: ({}, {:.1f})'.format(i, count, total))
Summing data from array based on other array in Numpy