

def next(self):
    file = next(self.files)
    assert (isinstance(file, tuple) or isintance(file, list)), (str(type(file)) + 'is not a tuple or list')
    with open(file[0], 'rb') as X_fin, open(file[1], 'rb') as y_fin:
        data = np.load(X_fin)
        X = data
        y = np.load(y_fin)
    if self.preprocessor:
        self.log.info(('..applying preprocessing: ' + self.preprocessor.__class__.__name__))
        data = self.preprocessor.apply(data)
        X = data
    if self.noise:
        self.log.info(('..applying noise: ' + self.noise.__class__.__name__))
        noisy_data = self.noise.apply(data)
        X = noisy_data
    self.single_block.set_Xy(X=X, y=y)
    return self.single_block

dataset/ETHPy150Open hycis/Pynet/pynet/datasets/dataset.py DataBlocks.next/original