We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
get
"x[1,1]"
Thanks or this handy package! While looking at namesingroup I found that get cannot handle names with square brackets:
namesingroup
using MCMCChains # v5.3.1 x = rand(10, 4) # chain with array names chn = Chains(x, ["a", "b", "c[1]", "c[2]"]) chn["c[1]"] # works chn[Symbol("c[1]")] # works get(chn, [:a, :b]) # works # all these return an empty NamedTuple get(chn, Symbol("c[1]")) get(chn, Symbol(["c[1]", "c[2]"])) get(chn, namesingroup(chn, :c)) # --- all works as expected with dots: chn2 = Chains(x, ["a", "b", "c.d", "c.e"]) chn2["c.d"] chn2[Symbol("c.d")] get(chn2, [:a, :b]) get(chn2, Symbol("c.d")) get(chn2, Symbol.(["c.d", "c.e"])) get(chn2, namesingroup(chn2, :c, index_type=:dot))
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Thanks or this handy package!
While looking at
namesingroup
I found thatget
cannot handle names with square brackets:The text was updated successfully, but these errors were encountered: