Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support PyStan3 #464

Merged
merged 15 commits into from
Dec 30, 2018
1 change: 1 addition & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ good-names=i,
mu,
tr,
ex,
eta,
Run,
_,
_log
Expand Down
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ matrix:
- name: "Python 3.6 Unit Test"
python: 3.6
env: PYSTAN_VERSION=latest NAME="UNIT"
- name: "Python 3.6 Unit Test - PyStan preview"
python: 3.6
env: PYSTAN_VERSION=preview NAME="UNIT"
- name: "Python 3.5 Unit Test"
python: 3.5
env: PYSTAN_VERSION=latest NAME="UNIT"
Expand Down
2 changes: 2 additions & 0 deletions arviz/data/converters.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ def convert_to_inference_data(obj, *, group="posterior", coords=None, dims=None,
return InferenceData.from_netcdf(obj)
elif obj.__class__.__name__ == "StanFit4Model": # ugly, but doesn't make PyStan a requirement
return from_pystan(posterior=obj, coords=coords, dims=dims, **kwargs)
elif obj.__class__.__module__ == "stan.fit": # ugly, but doesn't make PyStan3 a requirement
return from_pystan(posterior=obj, coords=coords, dims=dims, **kwargs)
elif obj.__class__.__name__ == "MultiTrace": # ugly, but doesn't make PyMC3 a requirement
return from_pymc3(trace=obj, coords=coords, dims=dims, **kwargs)
elif obj.__class__.__name__ == "EnsembleSampler": # ugly, but doesn't make emcee a requirement
Expand Down
Loading