Skip to content

Commit

Permalink
densify sparse W for inv
Browse files Browse the repository at this point in the history
  • Loading branch information
jClugstor committed Nov 27, 2024
1 parent 07e9ffd commit be5fc08
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/OrdinaryDiffEqDifferentiation/src/derivative_utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ struct StaticWOperator{isinv, T, F} <: AbstractSciMLOperator{T}
# when constructing W for the first time for the type
# inv(W) can be singular
_W = if isinv && callinv
inv(W)
# W may be sparse, needs to be dense to inv
inv(Matrix(W))
else
W
end
Expand Down

0 comments on commit be5fc08

Please sign in to comment.