Skip to content

Commit

Permalink
Merge c759673 into e33fdde
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisRackauckas committed May 27, 2020
2 parents e33fdde + c759673 commit 4fc1b8a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/stan_inference.jl
Expand Up @@ -59,7 +59,7 @@ function stan_inference(prob::DiffEqBase.DEProblem,t,data,priors = nothing,
length_of_params = length(vars)
if isnothing(diffeq_string)
sys = first(ModelingToolkit.modelingtoolkitize(prob))
length_of_parameter = length(sys.ps) + sample_u0 * length(save_idxs)
length_of_parameter = length(ModelingToolkit.parameters(sys)) + sample_u0 * length(save_idxs)
else
length_of_parameter = length(prob.p) + sample_u0 * length(save_idxs)
end
Expand Down Expand Up @@ -129,8 +129,8 @@ function stan_inference(prob::DiffEqBase.DEProblem,t,data,priors = nothing,
"""
if isnothing(diffeq_string)
diffeq_string = ModelingToolkit.build_function(
sys.eqs,sys.states,
sys.ps,sys.iv,
ModelingToolkit.equations(sys),ModelingToolkit.states(sys),
ModelingToolkit.parameters(sys),ModelingToolkit.independent_variable(sys),
fname = :sho,
target = ModelingToolkit.StanTarget()
)
Expand Down

0 comments on commit 4fc1b8a

Please sign in to comment.