Structured LinearOperators

class linear_operator.operators.TriangularLinearOperator(tensor, upper=False)[source]

A wrapper for LinearOperators when we have additional knowledge that it represents a lower- or upper-triangular matrix (or batch of matrices).

  • tensor (torch.Tensor or ~linear_operator.operators._linear_operator.LinearOperator) – A … x N x N Tensor, representing a (batch of) N x N triangular matrix.

  • upper (bool) – If True, the tensor is considered to be upper-triangular, otherwise lower-triangular.


Returns a TriangleLinearOperator with the absolute value of all diagonal entries.

Return type:



Returns a TriangleLinearOperator with all diagonal entries exponentiated.

Return type:

~linear_operator.operators._linear_operator.LinearOperator (… x M x N)


Returns the inverse of the DiagLinearOperator.

Return type:

~linear_operator.operators._linear_operator.LinearOperator (… x N x N)