@@ -981,7 +981,11 @@ Base.nameof(model::Model{<:Function}) = nameof(model.f)
981981Generate a sample of type `T` from the prior distribution of the `model`.
982982"""
983983function Base. rand (rng:: Random.AbstractRNG , :: Type{T} , model:: Model ) where {T}
984- x = last (evaluate_and_sample!! (rng, model, SimpleVarInfo {Float64} (OrderedDict ())))
984+ x = last (
985+ evaluate_and_sample!! (
986+ rng, model, SimpleVarInfo {Float64} (OrderedDict {VarName,Any} ())
987+ ),
988+ )
985989 return values_as (x, T)
986990end
987991
@@ -1032,7 +1036,7 @@ julia> logjoint(demo_model([1., 2.]), chain);
10321036function logjoint (model:: Model , chain:: AbstractMCMC.AbstractChains )
10331037 var_info = VarInfo (model) # extract variables info from the model
10341038 map (Iterators. product (1 : size (chain, 1 ), 1 : size (chain, 3 ))) do (iteration_idx, chain_idx)
1035- argvals_dict = OrderedDict (
1039+ argvals_dict = OrderedDict {VarName,Any} (
10361040 vn_parent =>
10371041 values_from_chain (var_info, vn_parent, chain, chain_idx, iteration_idx) for
10381042 vn_parent in keys (var_info)
@@ -1090,7 +1094,7 @@ julia> logprior(demo_model([1., 2.]), chain);
10901094function logprior (model:: Model , chain:: AbstractMCMC.AbstractChains )
10911095 var_info = VarInfo (model) # extract variables info from the model
10921096 map (Iterators. product (1 : size (chain, 1 ), 1 : size (chain, 3 ))) do (iteration_idx, chain_idx)
1093- argvals_dict = OrderedDict (
1097+ argvals_dict = OrderedDict {VarName,Any} (
10941098 vn_parent =>
10951099 values_from_chain (var_info, vn_parent, chain, chain_idx, iteration_idx) for
10961100 vn_parent in keys (var_info)
@@ -1144,7 +1148,7 @@ julia> loglikelihood(demo_model([1., 2.]), chain);
11441148function Distributions. loglikelihood (model:: Model , chain:: AbstractMCMC.AbstractChains )
11451149 var_info = VarInfo (model) # extract variables info from the model
11461150 map (Iterators. product (1 : size (chain, 1 ), 1 : size (chain, 3 ))) do (iteration_idx, chain_idx)
1147- argvals_dict = OrderedDict (
1151+ argvals_dict = OrderedDict {VarName,Any} (
11481152 vn_parent =>
11491153 values_from_chain (var_info, vn_parent, chain, chain_idx, iteration_idx) for
11501154 vn_parent in keys (var_info)
0 commit comments