if sample[k] == 0 and self.vartype == dimod.SPIN:
                        sample[k] = -1