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

Gaussian example throws initialization error #12

Open
tansey opened this issue Nov 22, 2023 · 1 comment
Open

Gaussian example throws initialization error #12

tansey opened this issue Nov 22, 2023 · 1 comment

Comments

@tansey
Copy link

tansey commented Nov 22, 2023

Hi,

Just following along in the gaussian.jl example, I get an error at https://github.com/lindermanlab/NeymanScottProcesses.jl/blob/838505cb924e6f2bc8a2e80a16b2e4e24d7596e2/examples/gaussian.jl#L68:

ERROR: BoundsError: attempt to access 0-element Vector{Any} at index [0]
Stacktrace:
 [1] getindex
   @ ./essentials.jl:13 [inlined]
 [2] last(a::Vector{Any})
   @ Base ./abstractarray.jl:520
 [3] (::GibbsSampler)(model::GaussianNeymanScottModel{2}, data::Vector{RealObservation{2}}; initial_assignments::Vector{Int64})
   @ NeymanScottProcesses ~/.julia/packages/NeymanScottProcesses/VzzXx/src/samplers/gibbs.jl:76
 [4] (::MaskedSampler{CircleMask{2}})(model::GaussianNeymanScottModel{2}, unmasked_data::Vector{RealObservation{2}}; initial_assignments::Vector{Int64})
   @ NeymanScottProcesses ~/.julia/packages/NeymanScottProcesses/VzzXx/src/samplers/mask.jl:61
 [5] (::Annealer)(model::GaussianNeymanScottModel{2}, data::Vector{RealObservation{2}}; initial_assignments::Symbol)
   @ NeymanScottProcesses ~/.julia/packages/NeymanScottProcesses/VzzXx/src/samplers/anneal.jl:62
 [6] (::Annealer)(model::GaussianNeymanScottModel{2}, data::Vector{RealObservation{2}})
   @ NeymanScottProcesses ~/.julia/packages/NeymanScottProcesses/VzzXx/src/samplers/anneal.jl:33
 [7] top-level scope
   @ REPL[246]:2
@degleris1
Copy link
Member

@tansey Could you checkout the hotfix branch and try the example again?

I also added a Pluto notebook so you can run the example interactively.

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

2 participants