def hp_categorical(self, memo, node, label, tid, val):
        """
        Parameters: See `hp_uniform`
        """
        size = memo[node.arg['size']]
        if size == 0:
            return []
        val1 = np.atleast_1d(val)
        p = p_orig = np.asarray(memo[node.arg['p']])
        if p.ndim == 2:
            if len(p) not in (1, len(val1)):
                print node
                print p
                print np.asarray(p).shape
            assert len(p) in (1, len(val1))
        else:
            assert p.ndim == 1
            p = p[np.newaxis, :]
        upper = memo[node.arg['upper']]
        if val1.size:
            counts = np.bincount(val1, minlength=upper) / float(val1.size)
            prior = self.shrinking(label)
        else:
            counts = np.zeros(upper)
            prior = 1.0
        new_p = (prior - 1) * counts + prior * p
        assert new_p.ndim == 2
        rval = categorical(p=new_p, rng=self.rng, size=size)
        if p_orig.ndim == 1:
            assert len(rval) == 1
            return rval[0]
        else:
            return rval
dataset/ETHPy150Open hyperopt/hyperopt/hyperopt/anneal.py/AnnealingAlgo.hp_categorical/swapped operands of `-`