Skip to content

Commit d5db247

Browse files
committed
up
1 parent fd2ed7e commit d5db247

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

ext/CatalystStructuralIdentifiabilityExtension/structural_identifiability_extension.jl

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,10 +175,13 @@ function make_osys(rs::ReactionSystem; remove_conserved = true)
175175
if remove_conserved
176176
conseqs = [ceq.lhs => ceq.rhs for ceq in conservedequations(rs)]
177177
consconsts = [cconst.lhs => cconst.rhs for cconst in conservationlaw_constants(rs)]
178+
isempty(conseqs) && (conseqs = Vector{Pair{Any, Any}}[])
179+
isempty(consconsts) && (consconsts = Vector{Pair{Any, Any}}[])
180+
else
181+
conseqs = Vector{Pair{Any, Any}}[]
182+
consconsts = Vector{Pair{Any, Any}}[]
178183
end
179-
remove_conserved || isnothing(conseqs) && (conseqs = Vector{Pair{Any, Any}}[])
180-
remove_conserved || isnothing(consconsts) && (consconsts = Vector{Pair{Any, Any}}[])
181-
184+
182185
return osys, conseqs, consconsts, vars
183186
end
184187

0 commit comments

Comments
 (0)