Skip to content

Commit e74e754

Browse files
committed
fix type instability
1 parent ade11d3 commit e74e754

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/systems/diffeqs/abstractodesystem.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -298,12 +298,12 @@ function W_sparsity(sys::AbstractODESystem)
298298
jac_sparsity = jacobian_sparsity(sys)
299299
else
300300
jac = calculate_jacobian(sys; sparse = true)
301-
jac_sparsity = sparse((!iszero).(jac))
301+
jac_sparsity = SparseMatrixCSC{Bool, Int64}((!iszero).(jac))
302302
end
303303
(n, n) = size(jac_sparsity)
304304
M = calculate_massmatrix(sys)
305-
M_sparsity = M isa UniformScaling ? sparse(I(n)) : sparse((!iszero).(M))
306-
jac_sparsity .|| M_sparsity
305+
M_sparsity = M isa UniformScaling ? sparse(I(n)) : SparseMatrixCSC{Bool, Int64}((!iszero).(M))
306+
jac_sparsity .| M_sparsity
307307
end
308308

309309
function isautonomous(sys::AbstractODESystem)

0 commit comments

Comments
 (0)