From f1619d5c555a3ba8cc5568f9306858db14a5252d Mon Sep 17 00:00:00 2001 From: Darren Wilkinson Date: Sat, 16 Nov 2024 15:05:13 +0000 Subject: [PATCH] reformat with black --- demos/metropolis_hastings.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/demos/metropolis_hastings.py b/demos/metropolis_hastings.py index 62caf6b..a47da60 100755 --- a/demos/metropolis_hastings.py +++ b/demos/metropolis_hastings.py @@ -11,12 +11,15 @@ k1, k2 = jax.random.split(k0) data = jax.random.normal(k1, 250) * 2 + 5 + def llik(k, x): return jnp.sum(jsp.stats.norm.logpdf(data, x[0], x[1])) + def prop(k, x): return jax.random.normal(k, 2) * 0.1 + x + postmat = jsmfsb.metropolis_hastings(k2, jnp.array([1.0, 1.0]), llik, prop, verb=False) fig, axes = plt.subplots(3, 2)