def sample(self, k=1):
        rs = np.random.random(k)
        # binary search to get indices
        return np.searchsorted(self._cdf, rs)
Return k random index draws from the distribution.
dataset/ETHPy150Open ml-slac/deep-jets/utils/sampling.py/MultinomialSampler.sample