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

filldist/arraydist construct NIW prior? #2391

Open
Li-shiyue opened this issue Nov 6, 2024 · 1 comment
Open

filldist/arraydist construct NIW prior? #2391

Li-shiyue opened this issue Nov 6, 2024 · 1 comment
Labels

Comments

@Li-shiyue
Copy link

Minimal working example

niw = NormalInverseWishart(mu0, kappa, cholesky(Lambda), nu)
# Σ ~ filldist(InverseWishart(niw.nu, niw.Lamchol),K)
Σ ~ arraydist([InverseWishart(niw.nu, niw.Lamchol) for i =1:K])
μ ~ arraydist([MvNormal(niw.mu, Σ[i]./niw.kappa) for i = 1:K])

Description

Can Turing support indexing from pre built arraydists or filldist,I failed to try
ERROR: MethodError: no method matching reconstruct(::Tuple{Int64, Int64, Int64}, ::SubArray{Float64, 1, Vector{Float64}, Tuple{UnitRange{Int64}}, true})

Julia version info

versioninfo()
(Paste here)

Manifest

]st --manifest
(Paste here)
@Li-shiyue Li-shiyue added the bug label Nov 6, 2024
@torfjelde
Copy link
Member

Can Turing support indexing from pre built arraydists or filldist?

Yep!

In the above, you're not re-using niw distribution, so that's not what's happening here:)

But can you add the ]st --manifest to your issue? This works on my end so you might just be on an old version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants