We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1be3ebd commit 344965cCopy full SHA for 344965c
ext/ParetoSmoothDynamicPPLExt.jl
@@ -37,7 +37,7 @@ function ParetoSmooth.pointwise_log_likelihoods(model::DynamicPPL.Model, chains:
37
# Size of array (n_steps, n_chains) using first parameter
38
dims = size(last(first(log_like_dict)))
39
# parse "var[i]" -> i
40
- ind_from_string(x) = parse(Int, split(split(x, "[")[2], "]")[1])
+ ind_from_string(x) = parse(Int, rsplit(rsplit(x, "[", limit=2)[2], "]", limit=2)[1])
41
# collect variable names
42
sorted_keys = sort(collect(keys(log_like_dict)); by=ind_from_string)
43
# Convert from dictionary to 3d array
0 commit comments