scipy.sparse.linalg.LinearOperator.

dot#

LinearOperator.dot(x)[source]#

Multi-purpose multiplication method.

Parameters:
xarray_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:
Axarray 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.

See also

__mul__

Equivalent method used by the * operator.

__matmul__

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

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.