def _intercept_dot(w, X, y):
 c = 0.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)

def _intercept_dot ( w , X , y ) : c = 0.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 .