Skip to content

Commit 8bdf46b

Browse files
committed
fix test bug and rasterise
Signed-off-by: Nathaniel <NathanielF@users.noreply.github.com>
1 parent 729f414 commit 8bdf46b

File tree

2 files changed

+19
-17
lines changed

2 files changed

+19
-17
lines changed

causalpy/pymc_models.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -385,13 +385,14 @@ def sample_predictive_distribution(self, ppc_sampler="jax"):
385385
)
386386
)
387387
elif ppc_sampler == "pymc":
388-
self.idata.extend(pm.sample_prior_predictive(random_seed=random_seed))
389-
self.idata.extend(
390-
pm.sample_posterior_predictive(
391-
self.idata,
392-
random_seed=random_seed,
388+
with self:
389+
self.idata.extend(pm.sample_prior_predictive(random_seed=random_seed))
390+
self.idata.extend(
391+
pm.sample_posterior_predictive(
392+
self.idata,
393+
random_seed=random_seed,
394+
)
393395
)
394-
)
395396

396397
def fit(self, X, Z, y, t, coords, priors, ppc_sampler=None):
397398
"""Draw samples from posterior distribution and potentially

docs/source/notebooks/iv_weak_instruments.ipynb

Lines changed: 12 additions & 11 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)