Given an array of integer counts c, how can I transform that into an array of integers inds such that np.all(np.bincount(inds) == c) i
c
inds
np.all(np.bincount(inds) == c)
using numpy.repeat :
np.repeat(np.arange(c.size), c)