def dot ( self , w ) : return sum ( [ x * y for x , y in zip ( self , w ) ] )
how to take dot product of two vecotrs in python
Return the dotproduct between self and another vector .
def dot(self, w):
        """Return the dotproduct between self and another vector."""

        return sum([x * y for x, y in zip(self, w)])