Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1""" 

2Implements of the :epkg:`dot` function in python. 

3""" 

4 

5 

6def pydot(va, vb): 

7 """ 

8 Implements the dot product between two vectors. 

9 

10 :param va: first vector 

11 :param vb: second vector 

12 :return: dot product 

13 """ 

14 return sum((a * b) for a, b in zip(va, vb))