... all(pa.mask) is true AND it doesn't contain ALBs/nested PAs/nested VNTs) AND it isn't a GrowableArray
In other words:
julia> using DynamicPPL
julia> vnt = @vnt begin
@template x = zeros(2)
x[1] := 1.0
x[2] := 2.0
end
VarNamedTuple
└─ x => PartialArray size=(2,) data::Vector{Float64}
├─ (1,) => 1.0
└─ (2,) => 2.0
julia> keys(vnt)
2-element Vector{VarName}:
x[1]
x[2]
The final call should return x rather than x[1] and x[2].