Skip to content

Commit a216190

Browse files
committed
Explicitly test pickling and unpickling of DensityDist
1 parent a92ce54 commit a216190

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pymc3/tests/test_distributions.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1881,5 +1881,8 @@ def func(x):
18811881

18821882
with pm.Model():
18831883
pm.Normal('x')
1884-
pm.DensityDist('y', func)
1885-
pm.sample(draws=1, tune=1, mp_ctx="spawn")
1884+
y = pm.DensityDist('y', func)
1885+
pm.sample(draws=5, tune=1, mp_ctx="spawn")
1886+
1887+
import pickle
1888+
pickle.loads(pickle.dumps(y))

0 commit comments

Comments
 (0)