Skip to content
New issue

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

MvNormal aliases should have looser type constraints #921

Open
nickrobinson251 opened this issue Jul 3, 2019 · 0 comments
Open

MvNormal aliases should have looser type constraints #921

nickrobinson251 opened this issue Jul 3, 2019 · 0 comments

Comments

@nickrobinson251
Copy link
Contributor

Is there a reason for these to be Float64 rather than Real?

const IsoNormal = MvNormal{Float64,ScalMat{Float64},Vector{Float64}}
const DiagNormal = MvNormal{Float64,PDiagMat{Float64,Vector{Float64}},Vector{Float64}}
const FullNormal = MvNormal{Float64,PDMat{Float64,Matrix{Float64}},Vector{Float64}}
const ZeroMeanIsoNormal = MvNormal{Float64,ScalMat{Float64},ZeroVector{Float64}}
const ZeroMeanDiagNormal = MvNormal{Float64,PDiagMat{Float64,Vector{Float64}},ZeroVector{Float64}}
const ZeroMeanFullNormal = MvNormal{Float64,PDMat{Float64,Matrix{Float64}},ZeroVector{Float64}}

It leads to stuff like this:

julia> z1 = MvNormal([1.0, 1.0])
ZeroMeanDiagNormal(
dim: 2
μ: [0.0, 0.0]
Σ: [1.0 0.0; 0.0 1.0]
)

julia> z2 = MvNormal([1, 1])
MvNormal{Int64,PDiagMat{Int64,Array{Int64,1}},Distributions.ZeroVector{Int64}}(
dim: 2
μ: [0, 0]
Σ: [1 0; 0 1]
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant