diff --git a/cola/linalg/inv.py b/cola/linalg/inv.py index 7c6e3591..6e4243d0 100644 --- a/cola/linalg/inv.py +++ b/cola/linalg/inv.py @@ -2,8 +2,8 @@ from plum import dispatch from cola.ops import LinearOperator from cola.ops import Diagonal, Permutation -from cola.ops import Identity -from cola.ops import ScalarMul +from cola.ops import Identity, Dense +from cola.ops import ScalarMul, Sum from cola.ops import BlockDiag, Triangular from cola.ops import Kronecker, Product from cola.algorithms.cg import cg @@ -180,4 +180,4 @@ def inv(A: Sum[Product[Dense,Dense], Diagonal], **kwargs): @dispatch def inv(A: Sum[Diagonal, Product[Dense,Dense]], **kwargs): - return inv(Product(*C.Ms[1].Ms) + C.Ms[0]) \ No newline at end of file + return inv(Product(*A.Ms[1].Ms) + A.Ms[0]) \ No newline at end of file