Skip to content

Commit bdcc69f

Browse files
committed
fixed bug in getranges for untyped varinfo
1 parent 23bfe54 commit bdcc69f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/varinfo.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,7 @@ setrange!(md::Metadata, vn::VarName, range) = md.ranges[getidx(md, vn)] = range
646646
Return the indices of `vns` in the metadata of `vi` corresponding to `vn`.
647647
"""
648648
function getranges(vi::VarInfo, vns::Vector{<:VarName})
649-
return mapreduce(Base.Fix1(getrange, vi), vcat, vns; init=Int[])
649+
return map(Base.Fix1(getrange, vi), vns)
650650
end
651651
# A more efficient version for `TypedVarInfo`.
652652
function getranges(varinfo::DynamicPPL.TypedVarInfo, vns::Vector{<:DynamicPPL.VarName})

0 commit comments

Comments
 (0)