Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Hong Ge <[email protected]>
  • Loading branch information
torfjelde and yebai authored Oct 10, 2023
1 parent 40cce25 commit cb2f40e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/varinfo.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1038,7 +1038,7 @@ function _invlink_metadata!(varinfo::VarInfo, metadata::Metadata, target_vns)
# Construct the new transformed values, and keep track of their lengths.
vals_new = map(vns) do vn
# Return early if we're already in constrained space OR if we're not
# supposed to touch this `vn`.
# supposed to touch this `vn`, e.g. when `vn` does not belong to the current sampler.
# HACK: if `target_vns` is `nothing`, we ignore the `target_vns` check.
if !istrans(varinfo, vn) || (target_vns !== nothing && vn target_vns)
return metadata.vals[getrange(metadata, vn)]
Expand Down

0 comments on commit cb2f40e

Please sign in to comment.