@@ -981,7 +981,11 @@ Base.nameof(model::Model{<:Function}) = nameof(model.f)
981
981
Generate a sample of type `T` from the prior distribution of the `model`.
982
982
"""
983
983
function 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
+ )
985
989
return values_as (x, T)
986
990
end
987
991
@@ -1028,7 +1032,7 @@ julia> logjoint(demo_model([1., 2.]), chain);
1028
1032
function logjoint (model:: Model , chain:: AbstractMCMC.AbstractChains )
1029
1033
var_info = VarInfo (model) # extract variables info from the model
1030
1034
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} (
1032
1036
vn_parent =>
1033
1037
values_from_chain (var_info, vn_parent, chain, chain_idx, iteration_idx) for
1034
1038
vn_parent in keys (var_info)
@@ -1082,7 +1086,7 @@ julia> logprior(demo_model([1., 2.]), chain);
1082
1086
function logprior (model:: Model , chain:: AbstractMCMC.AbstractChains )
1083
1087
var_info = VarInfo (model) # extract variables info from the model
1084
1088
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} (
1086
1090
vn_parent =>
1087
1091
values_from_chain (var_info, vn_parent, chain, chain_idx, iteration_idx) for
1088
1092
vn_parent in keys (var_info)
@@ -1136,7 +1140,7 @@ julia> loglikelihood(demo_model([1., 2.]), chain);
1136
1140
function Distributions. loglikelihood (model:: Model , chain:: AbstractMCMC.AbstractChains )
1137
1141
var_info = VarInfo (model) # extract variables info from the model
1138
1142
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} (
1140
1144
vn_parent =>
1141
1145
values_from_chain (var_info, vn_parent, chain, chain_idx, iteration_idx) for
1142
1146
vn_parent in keys (var_info)
0 commit comments