def _adaptResampling(self, res, alt):
        #compute rank change
        rc = sum([(x-res) * (x-alt) < 0 for x in self.recents[1:]])
        if rc >= self.threshold*(1-self.batchsize):
            self.resample_over *= self.update_factor 
            if self.max_resampling is not None and self.resample_over > self.max_resampling:
                self.resample_over = self.max_resampling
        elif rc == 0:
            self.resample_over = max(self.resample_over/self.update_factor, 1)
dataset/ETHPy150Open pybrain/pybrain/pybrain/tools/aptativeresampling.py/AdaptiveResampler._adaptResampling/swapped operands of `-`