Skip to content

Commit

Permalink
Merge pull request #346 from GeoStat-Framework/emcee_vectorize
Browse files Browse the repository at this point in the history
emcee: vectorize sampling since all ln_pdfs accept numpy arrays
  • Loading branch information
MuellerSeb authored Apr 19, 2024
2 parents 228edf9 + c88f7ba commit af19c44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gstools/random/rng.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def sample_ln_pdf(
self.random.rand(nwalkers).reshape((nwalkers, 1)) * sample_around
)
# initialize the sampler
sampler = mc.EnsembleSampler(nwalkers, 1, ln_pdf)
sampler = mc.EnsembleSampler(nwalkers, 1, ln_pdf, vectorize=True)
# burn in phase with saving of last position
initial_state = State(init_guess, copy=True)
initial_state.random_state = self.random.get_state()
Expand Down

0 comments on commit af19c44

Please sign in to comment.