def __init__(self, data, ddof=1, const_idx=None, demean=True):
        data = np.asarray(data)
        self.mean = data.mean(0)
        self.scale = data.std(0, ddof=1)

        # do not transform a constant
        if const_idx is None:
            const_idx = np.nonzero(self.scale == 0)[0]
            if len(const_idx) == 0:
                const_idx = 'nc'

        if const_idx != 'nc':
            self.mean[const_idx] = 0
            self.scale[const_idx] = 1

        if demean is False:
            self.mean = None

        self.const_idx = const_idx
dataset/ETHPy150Open statsmodels/statsmodels/statsmodels/tools/transform_model.py/StandardizeTransform.__init__/original