<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _center(X, w, s, mask=None, const=None, inplace=True):
 """ 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 """

    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