Skip to content

Commit

Permalink
emcee: vectorize sampling since all ln_pdfs accept numpy arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
MuellerSeb committed Apr 17, 2024
1 parent 228edf9 commit c88f7ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gstools/random/rng.py
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 c88f7ba

Please sign in to comment.