TuringLang/MCMCChains.jl

`section=:parameters` cannot be combined with `flatten=true`

Opened this issue · 0 comments

julia> chain = Chains(rand(10, 2, 3), ["a", "b"]);

julia> get(chain; section=:parameters, flatten=true)
ERROR: MethodError: no method matching append!(::Set{Symbol}, ::Vector{Symbol})
Closest candidates are:
  ...
Stacktrace:
 [1] get(c::Chains{Float64, AxisArrays.AxisArray{Float64, 3, Array{Float64, 3}, Tuple{AxisArrays.Axis{:iter, StepRange{Int64, Int64}}, AxisArrays.Axis{:var, Vector{Symbol}}, AxisArrays.Axis{:chain, UnitRange{Int64}}}}, Missing, NamedTuple{(:parameters,), Tuple{Vector{Symbol}}}, NamedTuple{(), Tuple{}}}; section::Symbol, flatten::Bool)
   @ MCMCChains ~/.julia/packages/MCMCChains/EvzG5/src/chains.jl:295
 [2] top-level scope
   @ REPL[34]:1

julia> get(chain; section=:parameters, flatten=false)
(a = [0.29019804991277354 0.38940387402131527 0.6751497264302444; 0.1081448462824589 0.3072854545677228 0.06897564539965606;  ; 0.10628607377579369 0.6542766272819693 0.31650564861356845; 0.14055454045883942 0.513158692771091 0.1309815266873774], b = [0.6794235010018413 0.32214572206855563 0.028887527748839292; 0.5793307993781729 0.9923388374862135 0.27771616930281184;  ; 0.11847833884988912 0.06046108444342613 0.5766332484370827; 0.07904321895570443 0.6472174797577032 0.6091401118149271])