summaryrefslogtreecommitdiff
path: root/snippets/python-mode/pm
diff options
context:
space:
mode:
Diffstat (limited to 'snippets/python-mode/pm')
-rw-r--r--snippets/python-mode/pm16
1 files changed, 16 insertions, 0 deletions
diff --git a/snippets/python-mode/pm b/snippets/python-mode/pm
new file mode 100644
index 0000000..c5fb977
--- /dev/null
+++ b/snippets/python-mode/pm
@@ -0,0 +1,16 @@
+# name: pymc
+# key: pm
+# expand-env: ((yas/indent-line 'fixed))
+# --
+import theano.tensor as tn
+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)