Skip to content

Commit 359094d

Browse files
committed
Fix tests
1 parent c58c63e commit 359094d

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/build_function.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,7 @@ function _build_function(target::StanTarget, eqs::Array{<:Equation}, vs, ps, iv;
585585
rhsnames=rhsnames) for
586586
(i, eq) enumerate(eqs)],";\n "),";")
587587
"""
588-
real[] $fname(real $iv,real[] $(rhsnames[1]),real[] $(rhsnames[2]),real[] x_r,int[] x_i) {
588+
real[] $fname(real $(conv(iv)),real[] $(rhsnames[1]),real[] $(rhsnames[2]),real[] x_r,int[] x_i) {
589589
real $lhsname[$(length(eqs))];
590590
$differential_equation
591591
return $lhsname;

src/systems/diffeqs/modelingtoolkitize.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,9 @@ function modelingtoolkitize(prob::DiffEqBase.OptimizationProblem)
102102
p = prob.p
103103
end
104104

105-
vars = reshape([Variable(:x, i)() for i in eachindex(prob.u0)],size(prob.u0))
105+
vars = reshape([Variable(:x, i) for i in eachindex(prob.u0)],size(prob.u0))
106106
params = p isa DiffEqBase.NullParameters ? [] :
107-
reshape([Variable(,i)() for i in eachindex(p)],size(Array(p)))
107+
reshape([Variable(,i) for i in eachindex(p)],size(Array(p)))
108108

109109

110110
eqs = prob.f(vars, params)

test/variable_utils.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ using ModelingToolkit, Test
22
@parameters α β δ
33
expr = (((1 / β - 1) + δ) / α) ^ (1 /- 1))
44
ref = [β, δ, α]
5-
sol = ModelingToolkit.get_variables(expr)
5+
sol = Num.(ModelingToolkit.get_variables(expr))
66
@test all(simplify, sol[i] == ref[i] for i in 1:3)
77

88
@parameters γ

0 commit comments

Comments
 (0)