diff options
author | Kyle Meyer <kyle@kyleam.com> | 2013-11-20 17:20:17 -0500 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2013-11-20 17:20:17 -0500 |
commit | c235eb6a0c12cc4868567f814af515572b59019d (patch) | |
tree | 4ff29c93a09bcbdb72e294dc011efc02539cda81 /snippets | |
parent | c6e9d09e05344ce88f0c68e8e57fb658d691a712 (diff) | |
download | emacs.d-c235eb6a0c12cc4868567f814af515572b59019d.tar.gz |
Add pymc snippet
Diffstat (limited to 'snippets')
-rw-r--r-- | snippets/python-mode/pm | 16 |
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) |