Skip to content

Operators

Linear operator abstractions for GPJax.

LinearOperator

LinearOperator()

Bases: ABC

Abstract base class for linear operators.

shape abstractmethod property

shape: tuple[int, int]

Return the shape of the operator.

dtype abstractmethod property

dtype: dtype

Return the data type of the operator.

T property

T: LinearOperator

Return the transpose of the operator.

to_dense abstractmethod

to_dense() -> Float[Array, 'M N']

Convert the operator to a dense JAX array.

__add__

__add__(other)

Addition with another array or operator.

__mul__

__mul__(other)

Scalar multiplication (self * scalar).

Dense

Dense(array: Float[Array, 'M N'])

Bases: LinearOperator

Dense linear operator wrapping a JAX array.

__add__

__add__(other)

Addition with another array or operator.

__mul__

__mul__(other)

Scalar multiplication (self * scalar).

Diagonal

Diagonal(diagonal: Float[Array, ' N'])

Bases: LinearOperator

Diagonal linear operator.

__add__

__add__(other)

Addition with another array or operator.

__mul__

__mul__(other)

Scalar multiplication (self * scalar).

Identity

Identity(shape: int | tuple[int, int], dtype=jnp.float64)

Bases: LinearOperator

Identity linear operator.

__add__

__add__(other)

Addition with another array or operator.

__mul__

__mul__(other)

Scalar multiplication (self * scalar).

Triangular

Triangular(array: Float[Array, 'N N'], lower: bool = True)

Bases: LinearOperator

Triangular linear operator.

__add__

__add__(other)

Addition with another array or operator.

__mul__

__mul__(other)

Scalar multiplication (self * scalar).

BlockDiag

BlockDiag(
    operators: list[LinearOperator],
    multiplicities: list[int] | None = None,
)

Bases: LinearOperator

Block diagonal linear operator.

__add__

__add__(other)

Addition with another array or operator.

__mul__

__mul__(other)

Scalar multiplication (self * scalar).

Kronecker

Kronecker(operators: list[LinearOperator])

Bases: LinearOperator

Kronecker product linear operator.

__add__

__add__(other)

Addition with another array or operator.

__mul__

__mul__(other)

Scalar multiplication (self * scalar).