numpy.linalg.vecdot#
- linalg.vecdot(x1, x2, /, *, axis=-1)[source]#
Computes the vector dot product.
This function is restricted to arguments compatible with the Array API, contrary to
numpy.vecdot.Let \(\mathbf{a}\) be a vector in
x1and \(\mathbf{b}\) be a corresponding vector inx2. The dot product is defined as:\[\mathbf{a} \cdot \mathbf{b} = \sum_{i=0}^{n-1} \overline{a_i}b_i\]over the dimension specified by
axisand where \(\overline{a_i}\) denotes the complex conjugate if \(a_i\) is complex and the identity otherwise.- Parameters:
- x1array_like
First input array.
- x2array_like
Second input array.
- axisint, optional
Axis over which to compute the dot product. Default:
-1.
- Returns:
- outputndarray
The vector dot product of the input.
See also