dask 2021.10.0

ParametersReturnsBackRef
vdot(a, b, /)

Some inconsistencies with the Dask version may exist.

Return the dot product of two vectors.

The vdot(a, b) function handles complex numbers differently than dot(a, b). If the first argument is complex the complex conjugate of the first argument is used for the calculation of the dot product.

Note that vdot handles multidimensional arrays differently than dot : it does not perform a matrix product, but flattens input arguments to 1-D vectors first. Consequently, it should only be used for vectors.

Parameters

a : array_like

If a is complex the complex conjugate is taken before calculation of the dot product.

b : array_like

Second argument to the dot product.

Returns

output : ndarray

Dot product of a and b. Can be an int, float, or complex depending on the types of a and b.

This docstring was copied from numpy.vdot.

See Also

dot

Return the dot product without using the complex conjugate of the first argument.

Examples

This example is valid syntax, but we were not able to check execution
>>> a = np.array([1+2j,3+4j])  # doctest: +SKIP
... b = np.array([5+6j,7+8j]) # doctest: +SKIP
... np.vdot(a, b) # doctest: +SKIP (70-8j)
This example is valid syntax, but we were not able to check execution
>>> np.vdot(b, a)  # doctest: +SKIP
(70+8j)

Note that higher-dimensional arrays are flattened!

This example is valid syntax, but we were not able to check execution
>>> a = np.array([[1, 4], [5, 6]])  # doctest: +SKIP
... b = np.array([[4, 1], [2, 2]]) # doctest: +SKIP
... np.vdot(a, b) # doctest: +SKIP 30
This example is valid syntax, but we were not able to check execution
>>> np.vdot(b, a)  # doctest: +SKIP
30
This example is valid syntax, but we were not able to check execution
>>> 1*4 + 4*1 + 5*2 + 6*2  # doctest: +SKIP
30
See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

dask.array.routines.dot dask.array.routines.vdot

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: /dask/array/routines.py#330
type: <class 'function'>
Commit: