def __iter__(self):
        n = len(self.data)
        index = self.data.index
        indices = range(n)
        foldsize = n / self.num_folds
        folds = []
        if self.seed is not None:
            np.random.seed(self.seed)
        for i in range(self.repeat):
            np.random.shuffle(indices)
            for i in range(self.num_folds):
                test = index[indices[i*foldsize:(i + 1)*foldsize]]
                train = test - index
                assert not (train & test)
                fold = (pd.Index(train), pd.Index(test))
                yield fold
dataset/ETHPy150Open kvh/ramp/ramp/folds.py/BasicFolds.__iter__/swapped operands of `-`