Skip to content

Commit 9438d6d

Browse files
authored
Merge pull request #1730 from SciML/myb/sparsity
Better error msg and set the size of the sparsity matrix
2 parents 8605fbe + acfcb1d commit 9438d6d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/structural_transformation/codegen.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ function torn_system_with_nlsolve_jacobian_sparsity(state, var_eq_matching, var_
9393
end
9494
end
9595
end
96-
sparse(I, J, true)
96+
sparse(I, J, true, length(eqs_idxs), length(states_idxs))
9797
end
9898

9999
function gen_nlsolve!(is_not_prepended_assignment, eqs, vars, u0map::AbstractDict,

src/systems/diffeqs/odesystem.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ function build_explicit_observed_function(sys, ts;
333333
eqs_dict = eqs_cache[]
334334
rhs = get(eqs_dict, v, nothing)
335335
if rhs === nothing
336-
error("Observed variables depends on differentiated variable $v, but it's not explicit solved. Fix file an issue if you are sure that the system is valid.")
336+
error("The observed variable $(eq.lhs) depends on the differentiated variable $v, but it's not explicit solved. Fix file an issue if you are sure that the system is valid.")
337337
end
338338
end
339339
empty!(vars)

0 commit comments

Comments
 (0)