def construct_proposal(self, y):
        k = self.kernel.kernel(y.reshape(1,len(y)), self.Z)
        
        # take care about bool8 overflows preventing larger values
        diff = y.astype(numpy.int64)
        diff = diff - self.Z
        beta = randn(len(self.Z))
        weighted_sum = sum((k * beta).T * diff, 0)
        thresholded_sum = weighted_sum > self.threshold
        xored = logical_xor(thresholded_sum, y)
        
        # return distribution object that adds noise to the xor point
        return DiscreteRandomWalkProposal(xored, self.spread)
dataset/ETHPy150Open karlnapf/kameleon-mcmc/kameleon_mcmc/mcmc/samplers/DiscreteKameleon.py/DiscreteKameleon.construct_proposal/original