@@ -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
@@ -1032,7 +1036,7 @@ julia> logjoint(demo_model([1., 2.]), chain);
1032
1036
function logjoint (model:: Model , chain:: AbstractMCMC.AbstractChains )
1033
1037
var_info = VarInfo (model) # extract variables info from the model
1034
1038
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} (
1036
1040
vn_parent =>
1037
1041
values_from_chain (var_info, vn_parent, chain, chain_idx, iteration_idx) for
1038
1042
vn_parent in keys (var_info)
@@ -1090,7 +1094,7 @@ julia> logprior(demo_model([1., 2.]), chain);
1090
1094
function logprior (model:: Model , chain:: AbstractMCMC.AbstractChains )
1091
1095
var_info = VarInfo (model) # extract variables info from the model
1092
1096
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} (
1094
1098
vn_parent =>
1095
1099
values_from_chain (var_info, vn_parent, chain, chain_idx, iteration_idx) for
1096
1100
vn_parent in keys (var_info)
@@ -1144,7 +1148,7 @@ julia> loglikelihood(demo_model([1., 2.]), chain);
1144
1148
function Distributions. loglikelihood (model:: Model , chain:: AbstractMCMC.AbstractChains )
1145
1149
var_info = VarInfo (model) # extract variables info from the model
1146
1150
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} (
1148
1152
vn_parent =>
1149
1153
values_from_chain (var_info, vn_parent, chain, chain_idx, iteration_idx) for
1150
1154
vn_parent in keys (var_info)
0 commit comments