Skip to content

Commit 92b96d7

Browse files
committed
fixed calls to varinfo methods which should be metadata methods
1 parent 76a9183 commit 92b96d7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/varinfo.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1329,12 +1329,13 @@ end
13291329

13301330
function _inner_transform!(md::Metadata, vi::VarInfo, vn::VarName, f)
13311331
# TODO: Use inplace versions to avoid allocations
1332-
yvec, logjac = with_logabsdet_jacobian(f, getindex_internal(vi, vn))
1332+
yvec, logjac = with_logabsdet_jacobian(f, getindex_internal(vi, md))
13331333
# Determine the new range.
1334-
start = first(getrange(vi, vn))
1334+
start = first(getrange(md, vn))
13351335
# NOTE: `length(yvec)` should never be longer than `getrange(vi, vn)`.
1336-
setrange!(vi, vn, start:(start + length(yvec) - 1))
1336+
setrange!(md, vn, start:(start + length(yvec) - 1))
13371337
# Set the new value.
1338+
# TODO: should replace this with a `setval!` for `Metadata`.
13381339
setval!(vi, yvec, vn)
13391340
acclogp!!(vi, -logjac)
13401341
return vi

0 commit comments

Comments
 (0)