Skip to content

Commit

Permalink
Implement getindex for UntypedVarInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
penelopeysm committed Oct 30, 2024
1 parent 18af48a commit 35e3c34
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/varinfo.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1694,6 +1694,7 @@ Return the current value(s) of the random variables sampled by `spl` in `vi`.
The value(s) may or may not be transformed to Euclidean space.
"""
getindex(vi::UntypedVarInfo, spl::Sampler) = copy(getindex(vi.metadata.vals, _getranges(vi, spl)))

Check warning on line 1697 in src/varinfo.jl

View check run for this annotation

Codecov / codecov/patch

src/varinfo.jl#L1697

Added line #L1697 was not covered by tests
getindex(vi::VarInfo, spl::Sampler) = copy(getindex_internal(vi, _getranges(vi, spl)))
function getindex(vi::TypedVarInfo, spl::Sampler)
# Gets the ranges as a NamedTuple
Expand Down

0 comments on commit 35e3c34

Please sign in to comment.