You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
julia> ka =KeyedArray(rand(3), down=["a", "b", "c"]);
julia> mvn =MvNormal(ka, [1, 1, 1]);
julia>mean(mvn)
1-dimensional KeyedArray(NamedDimsArray(...)) with keys:↓ down ∈3-element Vector{String}
And data, 3-element Vector{Float64}:
("a") 0.8185032515167808
("b") 0.2940895403871865
("c") 0.7714754947104043
julia> kd =KeyedDistribution(mvn, [1, 2, 3]);
julia>mean(kd)
1-dimensional KeyedArray(NamedDimsArray(...)) with keys:↓ _ ∈3-element Vector{Int64}
And data, 3-element Vector{Float64}:
(1) 0.8185032515167808
(2) 0.2940895403871865
(3) 0.7714754947104043
Should this be allowed? It bit me recently where I've accidentally constructed the KeyedDistribution without naming the dimension. Maybe we want to check this when constructing the KeyedDistribution?
This would likely need to be done explicitly for each distribution in order to find any/all underlying keyed arrays - the check could only guarantee consistency for supported distributions?
Should this be allowed? It bit me recently where I've accidentally constructed the KeyedDistribution without naming the dimension. Maybe we want to check this when constructing the KeyedDistribution?
(Similar thing for
var
)Similar to #17
The text was updated successfully, but these errors were encountered: