bundles / numpy 2.5.0.dev0+git20251130.2de293a / numpy / linalg / vecdot
_ArrayFunctionDispatcher
numpy.linalg:vecdot
source: build-install/usr/lib/python3.14/site-packages/numpy/linalg/_linalg.py :3611
Signature
def vecdot ( x1 , x2 , / , axis = -1 ) Summary
Computes the vector dot product.
Extended Summary
This function is restricted to arguments compatible with the Array API, contrary to numpy.vecdot.
Let be a vector in x1 and be a corresponding vector in x2. The dot product is defined as:
over the dimension specified by axis and where denotes the complex conjugate if is complex and the identity otherwise.
Parameters
x1: array_likeFirst input array.
x2: array_likeSecond input array.
axis: int, optionalAxis over which to compute the dot product. Default:
-1.
Returns
output: ndarrayThe vector dot product of the input.
Examples
Get the projected size along a given normal for an array of vectors.v = np.array([[0., 5., 0.], [0., 0., 10.], [0., 6., 8.]]) n = np.array([0., 0.6, 0.8]) np.linalg.vecdot(v, n)✓
See also
Aliases
-
numpy.linalg.vecdot