code: def _center(X, w, s, mask=None, const=None, inplace=True):
      
      xmean = s / float(w)
      if mask is None:
          X = np.subtract(X, xmean, out=X if inplace else None)
      else:
          X = np.subtract(X, xmean[mask], out=X if inplace else None)
          const = np.subtract(const, xmean[~mask], const if inplace else None)
  
      return X, const
docs: Centers the data.
  
      Parameters
      ----------
      w : float
          statistical weight of s
      inplace : bool
          center in place
  
      Returns
      -------
      sx : ndarray
          uncentered row sum of X
      sx_centered : ndarray
          row sum of X after centering
  
      optional returns (only if Y is given):
  
      sy_raw : ndarray
          uncentered row sum of Y
      sy_centered : ndarray
          row sum of Y after centering