#NEWLINE# def _intercept_dot( w , X , y ) : #NEWLINE# #INDENT# 'Computes y * np.dot(X, w).\n\n    It takes into consideration if the intercept should be fit or not.\n\n    Parameters\n    ----------\n    w : ndarray, shape (n_features,) or (n_features + 1,)\n        Coefficient vector.\n\n    X : {array-like, sparse matrix}, shape (n_samples, n_features)\n        Training data.\n\n    y : ndarray, shape (n_samples,)\n        Array of labels.\n\n    Returns\n    -------\n    w : ndarray, shape (n_features,)\n        Coefficient vector without the intercept weight (w[-1]) if the\n        intercept should be fit. Unchanged otherwise.\n\n    X : {array-like, sparse matrix}, shape (n_samples, n_features)\n        Training data. Unchanged.\n\n    yz : float\n        y * np.dot(X, w).\n    ' #NEWLINE# c = 0.0 #NEWLINE# if ( w . size == ( X . shape [ 1 ] + 1 ) ) : #NEWLINE# #INDENT# c = X [ ( - 1 ) ] #NEWLINE# w = w [ : ( - 1 ) ] #NEWLINE# #UNINDENT# z = ( safe_sparse_dot ( X , w ) + c ) #NEWLINE# yz = ( y * z ) #NEWLINE# return ( w , c , yz )