def _intercept_dot(w, X, y):
    c = 0.
    if w.size == X.shape[1] + 1:
        c = w[-1]
        w = w[:-1]

    z = safe_sparse_dot(X, w) + c
    yz = y * z
    return w, c, yz
Computes y * np.dot(X, w).
dataset/ETHPy150Open scikit-learn/scikit-learn/sklearn/linear_model/logistic.py/_intercept_dot