Skip to content

Commit

Permalink
Use stack for autocor to avoid large compile times
Browse files Browse the repository at this point in the history
  • Loading branch information
sethaxen committed Dec 24, 2023
1 parent 49fe1c8 commit 1cef3ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/plot.jl
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const supportedplots = push!(collect(keys(translationdict)), :mixeddensity, :cor
lags = 0:(maxlag === nothing ? round(Int, 10 * log10(length(range(c)))) : maxlag)
# Chains are already appended in `c` if desired, hence we use `append_chains=false`
ac = autocor(c; sections = nothing, lags = lags, append_chains=false)
ac_mat = cat(reduce.(hcat, Iterators.drop.(ac, 1))...; dims=3)
ac_mat = stack(map(stack Base.Fix2(Iterators.drop, 1), ac))
val = colordim == :parameter ? ac_mat[:, :, i]' : ac_mat[i, :, :]
_AutocorPlot(lags, val)
elseif st supportedplots
Expand Down

0 comments on commit 1cef3ba

Please sign in to comment.