Finite-dimensional Linear Operators.

This package implements finite dimensional linear operators. It can be used to represent linear maps between finite-dimensional vector spaces without explicitly constructing their matrix representation in memory. This is particularly useful for sparse and structured matrices and often allows for the definition of a more efficient matrix-vector product. Linear operators support common algebraic operations, including matrix-vector products, addition, multiplication, and transposition.

Several algorithms in the probnum.linalg subpackage are able to operate on LinearOperator instances.



Return A as a LinearOperator.


Embedding(take_indices, put_indices, shape)

Embeds a vector into a higher-dimensional space by writing its entries to the given indices of the result vector.

LinearOperator(shape, dtype)

Abstract base class for matrix-free finite-dimensional linear operators.

LambdaLinearOperator(shape, dtype, *, matmul)

Convenience subclass of LinearOperator that lets you pass implementations of its methods as parameters instead of overriding them in a subclass.


A linear operator defined via a matrix.

Identity(shape[, dtype])

The identity operator.

IdentityKronecker(num_blocks, B)

Block-diagonal linear operator.

Scaling(factors[, shape, dtype])

Scaling linear operator.

Kronecker(A, B)

Kronecker product of two linear operators.

Selection(indices, shape[, dtype])

Indexing into a vector at one or multiple indices, represented as a LinearOperator.

SymmetricKronecker(A[, B])

Symmetric Kronecker product of two linear operators.

Symmetrize(n[, dtype])

Symmetrizes a vector in its matrix representation.


Forms a block diagonal matrix from the input linear operators.

Zero(shape[, dtype])

The zero matrix represented as a LinearOperator.

Class Inheritance Diagram

Inheritance diagram of probnum.linops.Embedding, probnum.linops.LinearOperator, probnum.linops.LambdaLinearOperator, probnum.linops.Matrix, probnum.linops.Identity, probnum.linops.IdentityKronecker, probnum.linops.Scaling, probnum.linops.Kronecker, probnum.linops.Selection, probnum.linops.SymmetricKronecker, probnum.linops.Symmetrize, probnum.linops.BlockDiagonalMatrix, probnum.linops.Zero