In this chapter, we will discuss about NumPy-vdot. This function returns the dot product of the two vectors. If the first argument is complex, then its conjugate is used for calculation. If the argument id is multi-dimensional array, it is flattened.
Example Of NumPy-vdot
import numpy as np a = np.array([[1,2],[3,4]]) b = np.array([[11,12],[13,14]]) print np.vdot(a,b)
It will produce the following output −
130
Note − 1*11 + 2*12 + 3*13 + 4*14 = 130
Next Topic – Click Here
Pingback: NumPy-dot - Adglob Infosystem Pvt Ltd ...................
Pingback: NumPy - Linear Algebra - Adglob Infosystem Pvt Ltd