pymc.smc.kernels.MH.set_rng#
- MH.set_rng(rng)#
Copy compiled functions, updating their random number generators.
This is necessary because these functions were compiled once at initialization, then pickled and sent to worker processes. Each worker needs its own RNG state to ensure independent sampling, so we replace the shared RNGs in the compiled functions with new ones created from the provided rng.
This method copies the functions, so it is expensive and should only be called once per worker!