ArgumentError when return_array = true set for any of the functions similar to EKP.get_ϕ. For this argument configuration, the goal is to get a dictionary with the parameter names and their corresponding parameter entries (which may be an array). This is more useful when parameters have multiple entries per named entry.
One possible solution (for one of the functions) is as follows:
function EKP.get_ϕ_mean_final(prior, eki, return_array = false)
final_means = EKP.get_ϕ_mean_final(prior, eki_final) # returns a vector of final iteration parameter means
batch_idx = EKP.batch(prior) # groups the parameters by name (useful for priors whith multiple parameters per named entry)
param_names = prior.name # get names
# create new dictionary
Dict(zip(param_names, [final_means[idx] for idx in batch_idx]))
end
ArgumentError when
return_array = trueset for any of the functions similar toEKP.get_ϕ. For this argument configuration, the goal is to get a dictionary with the parameter names and their corresponding parameter entries (which may be an array). This is more useful when parameters have multiple entries per named entry.One possible solution (for one of the functions) is as follows: