fn
vdot
→Tensorvdot(a: Tensor, b: Tensor)Vector dot product (complex-conjugating on the first argument).
Forwards to lucid.linalg.dot. For real tensors this is the
usual inner product; for complex tensors (when supported) the first
argument is conjugated, matching NumPy's vdot convention.
Parameters
aTensor1-D tensor.
bTensor1-D tensor of the same length as
a.Returns
Tensor0-D scalar tensor holding the dot product.
Notes
Mathematical definition (general case):
For real a this reduces to the standard inner product
. Tensors must be 1-D and of equal length.
Examples
>>> import lucid
>>> a = lucid.tensor([1., 2., 3.])
>>> b = lucid.tensor([4., 5., 6.])
>>> lucid.vdot(a, b)
Tensor(32.)