summaryrefslogtreecommitdiff
path: root/snippets/python-mode/pymc-file
diff options
context:
space:
mode:
Diffstat (limited to 'snippets/python-mode/pymc-file')
-rw-r--r--snippets/python-mode/pymc-file15
1 files changed, 15 insertions, 0 deletions
diff --git a/snippets/python-mode/pymc-file b/snippets/python-mode/pymc-file
new file mode 100644
index 0000000..65087a8
--- /dev/null
+++ b/snippets/python-mode/pymc-file
@@ -0,0 +1,15 @@
+# -*- mode: snippet -*-
+# name: pymc file
+# key: pmf
+# --
+import pymc as pm
+
+with pm.Model() as model:
+ $0
+
+if __name__ == '__main__':
+ with model:
+ start = {}
+ trace = pm.sample(1000,
+ step=pm.NUTS(model.vars),
+ start=start)