File tree Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 11name = " DynamicPPL"
22uuid = " 366bfd00-2699-11ea-058f-f148b4cae6d8"
3- version = " 0.36 .0"
3+ version = " 0.37 .0"
44
55[deps ]
66ADTypes = " 47edcb42-4c32-4615-8424-f2b9edc5f35b"
Original file line number Diff line number Diff line change @@ -231,7 +231,7 @@ function SimpleVarInfo{T}(
231231end
232232
233233# Constructor from `VarInfo`.
234- function SimpleVarInfo (vi:: VarInfo{<:NamedTuple{names}} , :: Type{D} ) where {names,D}
234+ function SimpleVarInfo (vi:: NTVarInfo , :: Type{D} ) where {names,D}
235235 values = values_as (vi, D)
236236 return SimpleVarInfo (values, vi. accs)
237237end
Original file line number Diff line number Diff line change 467467
468468 # # `untyped_varinfo`
469469 vi = DynamicPPL. untyped_varinfo (model)
470+
471+ # # `untyped_varinfo`
472+ vi = DynamicPPL. untyped_varinfo (model)
473+ vi = DynamicPPL. settrans!! (vi, true , vn)
474+ # Sample in unconstrained space.
475+ vi = last (DynamicPPL. evaluate!! (model, vi, SamplingContext ()))
476+ f = DynamicPPL. from_linked_internal_transform (vi, vn, dist)
477+ x = f (DynamicPPL. getindex_internal (vi, vn))
478+ @test getlogjoint (vi) ≈ Bijectors. logpdf_with_trans (dist, x, true )
479+
480+ # # `typed_varinfo`
481+ vi = DynamicPPL. typed_varinfo (model)
470482 vi = DynamicPPL. settrans!! (vi, true , vn)
471483 # Sample in unconstrained space.
472484 vi = last (DynamicPPL. evaluate!! (model, vi, SamplingContext ()))
You can’t perform that action at this time.
0 commit comments