Skip to content

Commit 847c46d

Browse files
committed
ENH Add run function to wishart example.
1 parent ec4be29 commit 847c46d

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

pymc3/examples/wishart.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,15 @@
3434

3535
start = pm.find_MAP()
3636
step = pm.NUTS(scaling=start)
37-
trace = pm.sample(500, step)
3837

39-
pm.traceplot(trace[100:]);
38+
39+
def run(n = 3000):
40+
if n == "short":
41+
n = 50
42+
with model:
43+
trace = sample(n, step, start)
44+
45+
pm.traceplot(trace);
46+
47+
if __name__ == '__main__':
48+
run()

0 commit comments

Comments
 (0)