![]() |
VOOZH | about |
numpy.vdot() returns the dot product of two vectors. If the first vector contains complex numbers, vdot() automatically takes its complex conjugate before performing the multiplication. For multi-dimensional arrays, it first flattens them and then computes the dot product.
Example: This example shows how numpy.vdot() works on complex numbers by conjugating the first input.
(23-2j)
Explanation:
numpy.vdot(a, b)
Parameters:
Example 1: This example shows how vdot() conjugates the first complex value before multiplication.
(11-2j)
Explanation:
Example 2: Here both arrays are 2×2 matrice, vdot() flattens them and performs element-wise multiplication.
55
Explanation:
Example 3: This example shows vdot() working like a normal dot product when inputs are real numbers.
17
Explanation: Computes -> 3*2 + 7*1 + 1*4 = 17.