def adapt(self, mcmc_chain, step_output):
        # only learn the proposal once, at a pre-specified iteration
        if mcmc_chain.iteration == self.num_samples_when_to_switch:
            iter_no = mcmc_chain.iteration
            inds = randint(self.num_sample_discard - iter_no, size=self.num_samples_gmm) + self.num_sample_discard
            unique_inds = unique(inds)
            self.proposal = self.fit_gmm(mcmc_chain.samples[unique_inds])
            
            #idx_left = self.num_sample_discard
            #idx_right = self.num_sample_discard + self.num_samples_gmm
            #samples = mcmc_chain.samples[idx_left:idx_right]
            #self.proposal = self.fit_gmm(samples)
dataset/ETHPy150Open karlnapf/kameleon-mcmc/kameleon_mcmc/mcmc/samplers/GMMMetropolis.py/GMMMetropolis.adapt/swapped operands of `-`