Parallel chains via Web Workers

sampling_parallel(n_chains=...) spawns one plain-JS Web Worker per chain -- no Pyodide in them, just stanwasm loaded fresh in each -- so multiple chains run concurrently. This page runs PyScript on the main thread (not a Worker, since PyScript's Worker mode needs cross-origin-isolation headers this static site doesn't set), so the Workers sampling_parallel spawns aren't nested inside another Worker here, unlike the JupyterLite/marimo demos -- just ordinary Workers off the main thread, an easier case.

packages = ["micropip", "numpy", "pandas", "matplotlib"]
loading Pyodide...