def hp_randint(self, memo, node, label, tid, val):
        """
        Parameters: See `hp_uniform`
        """
        upper = memo[node.arg['upper']]
        val1 = np.atleast_1d(val)
        if val1.size:
            counts = np.bincount(val1, minlength=upper) / float(val1.size)
        else:
            counts = np.zeros(upper)
            prior = 1.0
        prior = self.shrinking(label)
        p = (1 - prior) * counts + prior * (1.0 / upper)
        rval = categorical(p=p, upper=upper, rng=self.rng,
                           size=memo[node.arg['size']])
        return rval
dataset/ETHPy150Open hyperopt/hyperopt/hyperopt/anneal.py/AnnealingAlgo.hp_randint/original