-
Notifications
You must be signed in to change notification settings - Fork 421
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
Sampling from MvNormal with integer arrays fails #1004
Comments
we could add a conversion method, PR welcome :) |
it looks like something similar was marked resolved way back in issue #498 -- but it would appear that change only addressed a type error on invocation of the constructor. the code above fails because because:
i.e., should the |
Related - MvNormal with Array{Int} covariance also gives an unintuitive error: julia> MvNormal([0, 0.0], [1 0; 0 1])
ERROR: MethodError: no method matching PDMats.PDMat{Int64,Array{Int64,2}}(::Int64, ::Array{Int64,2}, ::LinearAlgebra.Cholesky{Float64,Array{Float64,2}}) |
Note that the fix for this (which originates in PDMats.jl) was merged and is now part of PDMats v0.10.1 |
so should this be closed? |
The fix is part of a PDMats patch release (v0.10.1), but a fresh install of Distributions grabs v0.10 (I just tested this with Julia v1.5)—so it's up to you how to proceed. I doubt putting an explicit [compat] requirement for PDMats v0.10.1 is what you'd want. |
But my suggestion would be to—in fact—add the [compat] for "0.10.1" before closing (which would capture [0.10.1, 0.11.0) |
When an
MvNormal
is created using integer arrays, sampling from the distribution fails.The text was updated successfully, but these errors were encountered: