bins = np.arange(0, 100, 10)
inds = np.digitize(a, bins) - 1
counts = np.bincount(inds)
for r, count in zip(bins, counts):
    pass
How to get counts per each partition in the values ranging 0-10, 10-20,... 90-100