def fit(self, X, y=None):
        if sparse.issparse(X):
            raise TypeError("RobustScaler cannot be fitted on sparse inputs")
        X = self._check_array(X, self.copy)
        if X.ndim == 1:
            warnings.warn(DEPRECATION_MSG_1D, DeprecationWarning)
        if self.with_centering:
            self.center_ = np.median(X, axis=0)

        if self.with_scaling:
            q = np.percentile(X, (25, 75), axis=0)
            self.scale_ = (q[1] - q[0])
            self.scale_ = _handle_zeros_in_scale(self.scale_, copy=False)
        return self
Compute the median and quantiles to be used for scaling.
dataset/ETHPy150Open scikit-learn/scikit-learn/sklearn/preprocessing/data.py/RobustScaler.fit