Implementing rounding (by manual integration) more efficiently

Only checking the marginal distributions can mask degeneracy. Check az.plot_energy (the two curves should overlap) for a global summary of the sampling process. Also check az.plot_pair to check pairwise joint distributions (you should ideally have gaussian clouds – look for linear relationships and geometric discontinuities). Also check the number of integration steps that was needed to generate each sample. It’s in idata.sample_stats.tree_depth, no nice plot to make as far as I know – check that it’s not too huge.

If everything really is OK and it’s still slow, try switching the nuts sampler to nutpie, numpyro, or blackjax for free speedups.