def apply(self, X):
        assert X.ndim == 2, "X.ndim must be 2"
        scale = float(self.scale)
        # Note: this is per-example mean across pixels, not the
        # per-pixel mean across examples. So it is perfectly fine
        # to subtract this without worrying about whether the current
        # object is the train, valid, or test set.
        if self.subtract_mean:
            self.mean = np.mean(X, axis=1)
            X = X - self.mean[:, np.newaxis]  # Makes a copy.
        else:
            X = X.copy()

        if self.use_std:
            # ddof=1 simulates MATLAB's var() behaviour, which is what Adam
            # Coates' code does.
            self.normalizers = np.sqrt(self.sqrt_bias + X.var(axis=1, ddof=1)) / scale
        else:
            self.normalizers = np.sqrt(self.sqrt_bias + (X ** 2).sum(axis=1)) / scale
        # Don't normalize by anything too small.
        self.normalizers[self.normalizers < self.min_divisor] = 1.
        X = X / self.normalizers[:, np.newaxis]  # Does not make a copy.
        return X
Returns
dataset/ETHPy150Open hycis/Mozi/mozi/datasets/preprocessor.py/GCN.apply