def set_Xy(self, X, y):
        num_examples = X.shape[0]
        total_ratio = sum(self.ratio)
        num_train = int(self.ratio[0] * 1.0 * num_examples / total_ratio)
        num_valid = int(self.ratio[1] / 1.0 * num_examples / total_ratio)

        train_X = X[:num_train]
        train_y = y[:num_train]

        valid_X = X[num_train:num_train+num_valid]
        valid_y = y[num_train:num_train+num_valid]

        test_X = X[num_train+num_valid:]
        test_y = y[num_train+num_valid:]

        self.train = IterMatrix(train_X, train_y, iter_class=self.iter_class,
                                    batch_size=self.batch_size,
                                    num_batches=self.num_batches, rng=self.rng)

        if self.ratio[1] == 0:
            self.log.warning('Valid set is empty! It is needed for early stopping and saving best model')

        self.valid = IterMatrix(valid_X, valid_y, iter_class=self.iter_class,
                                    batch_size=self.batch_size,
                                    num_batches=self.num_batches, rng=self.rng)

        if self.ratio[2] == 0:
            self.log.warning('Test set is empty! It is needed for testing the best model')

        self.test = IterMatrix(test_X, test_y, iter_class=self.iter_class,
                                    batch_size=self.batch_size,
                                    num_batches=self.num_batches, rng=self.rng)
dataset/ETHPy150Open hycis/Pynet/pynet/datasets/dataset.py/SingleBlock.set_Xy/operator `*` -> `/`