Skip to content

Commit 998114b

Browse files
fix: unwrap costs in System constructor
1 parent 32de647 commit 998114b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/systems/system.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,11 @@ function System(eqs::Vector{Equation}, iv, dvs, ps, brownians = [];
129129
noise_eqs = unwrap.(noise_eqs)
130130
end
131131

132+
costs = unwrap.(costs)
133+
if isempty(costs)
134+
costs = Union{BasicSymbolic, Real}[]
135+
end
136+
132137
parameter_dependencies, ps = process_parameter_dependencies(parameter_dependencies, ps)
133138
defaults = anydict(defaults)
134139
guesses = anydict(guesses)

0 commit comments

Comments
 (0)