From 35e3c34bc2621470edf4baec30da4dc0fc6ce7c0 Mon Sep 17 00:00:00 2001 From: Penelope Yong Date: Tue, 29 Oct 2024 23:37:42 +0000 Subject: [PATCH] Implement getindex for UntypedVarInfo --- src/varinfo.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/src/varinfo.jl b/src/varinfo.jl index 11fe08d0f..37f72f30b 100644 --- a/src/varinfo.jl +++ b/src/varinfo.jl @@ -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))) getindex(vi::VarInfo, spl::Sampler) = copy(getindex_internal(vi, _getranges(vi, spl))) function getindex(vi::TypedVarInfo, spl::Sampler) # Gets the ranges as a NamedTuple