@@ -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
@@ -1028,7 +1032,7 @@ julia> logjoint(demo_model([1., 2.]), chain);
10281032function logjoint (model:: Model , chain:: AbstractMCMC.AbstractChains )
10291033 var_info = VarInfo (model) # extract variables info from the model
10301034 map (Iterators. product (1 : size (chain, 1 ), 1 : size (chain, 3 ))) do (iteration_idx, chain_idx)
1031- argvals_dict = OrderedDict (
1035+ argvals_dict = OrderedDict {VarName,Any} (
10321036 vn_parent =>
10331037 values_from_chain (var_info, vn_parent, chain, chain_idx, iteration_idx) for
10341038 vn_parent in keys (var_info)
@@ -1082,7 +1086,7 @@ julia> logprior(demo_model([1., 2.]), chain);
10821086function logprior (model:: Model , chain:: AbstractMCMC.AbstractChains )
10831087 var_info = VarInfo (model) # extract variables info from the model
10841088 map (Iterators. product (1 : size (chain, 1 ), 1 : size (chain, 3 ))) do (iteration_idx, chain_idx)
1085- argvals_dict = OrderedDict (
1089+ argvals_dict = OrderedDict {VarName,Any} (
10861090 vn_parent =>
10871091 values_from_chain (var_info, vn_parent, chain, chain_idx, iteration_idx) for
10881092 vn_parent in keys (var_info)
@@ -1136,7 +1140,7 @@ julia> loglikelihood(demo_model([1., 2.]), chain);
11361140function Distributions. loglikelihood (model:: Model , chain:: AbstractMCMC.AbstractChains )
11371141 var_info = VarInfo (model) # extract variables info from the model
11381142 map (Iterators. product (1 : size (chain, 1 ), 1 : size (chain, 3 ))) do (iteration_idx, chain_idx)
1139- argvals_dict = OrderedDict (
1143+ argvals_dict = OrderedDict {VarName,Any} (
11401144 vn_parent =>
11411145 values_from_chain (var_info, vn_parent, chain, chain_idx, iteration_idx) for
11421146 vn_parent in keys (var_info)
0 commit comments