TensorPlay
latest (dev)
Copy
View Markdown

Latest development documentation · Updated 2026-10-15

tensorplay.functional.dot

tensorplay.functional.dot(input, tensor, *, out=None) → Tensor[source]

Computes the dot product of two 1D tensors.

Note

Unlike NumPy’s dot, tensorplay.dot intentionally only supports computing the dot product of two 1D tensors with the same number of elements.

Parameters:
  • input (Tensor) – first tensor in the dot product, must be 1D.

  • tensor (Tensor) – second tensor in the dot product, must be 1D.

Keyword Arguments:

out (Tensor, optional) – the output tensor.

Example:

>>> tensorplay.dot(tensorplay.tensor([2, 3]), tensorplay.tensor([2, 1]))
tensor(7)

>>> t1, t2 = tensorplay.tensor([0, 1]), tensorplay.tensor([2, 3])
>>> tensorplay.dot(t1, t2)
tensor(3)

On this page

Ask DeepWiki