File: model.py

package info (click to toggle)
python-bumps 1.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 6,180 kB
  • sloc: python: 24,284; xml: 493; ansic: 373; makefile: 209; sh: 94; javascript: 88
file content (11 lines) | stat: -rw-r--r-- 293 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
import sys
from importlib import import_module
from bumps.pymcfit import PyMCProblem

if len(sys.argv) != 2:
    raise ValueError("Expected name of pymc file containing a model")

module = sys.argv[1]
__name__ = module.split(".")[-1]
model = import_module(module)
problem = PyMCProblem(model)