How to calculate dot product of two vectors in Python?