{ } Raw JSON

bundles / scipy 1.18.0 / scipy / sparse / linalg / _interface / LinearOperator / dot

function

scipy.sparse.linalg._interface:LinearOperator.dot

source: /scipy/sparse/linalg/_interface.py:569

Signature

def dot(self, x)

Summary

Multi-purpose multiplication method.

Parameters

x : array_like or `LinearOperator` or scalar

Array-like input will be interpreted as a 1-D row vector or 2-D matrix (or batch of matrices) depending on its shape. See the Returns section for details.

Returns

Ax : array or `LinearOperator`
  • For LinearOperator input, operator composition is performed.

  • For scalar input, a lazily scaled operator is returned.

  • Otherwise, the input is expected to take the form of a dense 1-D vector or 2-D matrix (or batch of matrices), interpreted as follows (where self is an M by N linear operator):

    • If x has shape (N,) it is interpreted as a row vector and matvec is called.

    • If x has shape (..., N, K) for some integer K, it is interpreted as a matrix (or batch of matrices if there are batch dimensions) and matmat is called.

Notes

To perform matrix-vector multiplication on batches of vectors, use matvec.

For clarity, it is recommended to use the matvec or matmat methods directly instead of this method when interacting with dense vectors and matrices.

See also

__matmul__

Method used by the @ operator which rejects scalar input before calling this method.

__mul__

Equivalent method used by the * operator.

Aliases

  • scipy.linalg._decomp_interpolative.LinearOperator.dot