Skip to content

Commit b9c9fb7

Browse files
authored
Merge pull request #146 from vpuri3/patch-2
`InvertedOperator(::AbstractMatrix)` constructor
2 parents d2afff8 + e384062 commit b9c9fb7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/basic.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -648,6 +648,10 @@ function InvertedOperator(L::AbstractSciMLOperator{T}; cache=nothing) where{T}
648648
InvertedOperator(L, cache)
649649
end
650650

651+
function InvertedOperator(A::AbstractMatrix{T}; cache=nothing) where{T}
652+
InvertedOperator(MatrixOperator(A), cache)
653+
end
654+
651655
Base.inv(L::AbstractSciMLOperator) = InvertedOperator(L)
652656

653657
Base.:\(A::AbstractSciMLOperator, B::AbstractSciMLOperator) = inv(A) * B

0 commit comments

Comments
 (0)