diff --git a/README.rst b/README.rst index 71a17b55..89103fab 100644 --- a/README.rst +++ b/README.rst @@ -7,6 +7,8 @@ PyStan: The Python Interface to Stan |pypi| |travis| |appveyor| |zenodo| +.. tip:: PyStan 3 is available for Linux and macOS users. Visit the `PyStan 3 documentation `_ for details. PyStan 2 is not maintained. + **PyStan** provides a Python interface to Stan, a package for Bayesian inference using the No-U-Turn sampler, a variant of Hamiltonian Monte Carlo. @@ -14,10 +16,11 @@ For more information on `Stan `_ and its modeling language, see the Stan User's Guide and Reference Manual at `http://mc-stan.org/ `_. + Important links --------------- -- HTML documentation: https://pystan.readthedocs.org +- HTML documentation: https://pystan2.readthedocs.org - Issue tracker: https://github.com/stan-dev/pystan/issues - Source code repository: https://github.com/stan-dev/pystan - Stan: http://mc-stan.org/ @@ -33,15 +36,16 @@ Related projects Projects using PyStan --------------------- -- Prophet: `Timeseries forecasting `_ by @facebook - BAMBI: `BAyesian Model-Building Interface `_ by @bambinos - hBayesDM: `hierarchical Bayesian modeling of Decision-Making tasks `_ by @CCS-Lab +- Orbit: `Object-oRiented BayesIan Timeseries models `_ by @uber +- Prophet: `Timeseries forecasting `_ by @facebook Similar projects ---------------- -- PyMC: http://pymc-devs.github.io/pymc/ -- emcee: http://dan.iel.fm/emcee/current/ +- PyMC3: https://docs.pymc.io/ +- emcee: https://emcee.readthedocs.io/en/stable/ PyStan3 / Stan3 --------------- @@ -54,7 +58,7 @@ Detailed installation instructions can be found in the Windows Installation Instructions --------------------------------- -Detailed installation instructions for Windows can be found in docs under `PyStan on Windows `_ +Detailed installation instructions for Windows can be found in docs under `PyStan on Windows `_ Quick Installation (Linux and macOS) ------------------------------------ diff --git a/doc/Run_PyStan_in_Atom.rst b/doc/Run_PyStan_in_Atom.rst index b83282de..782d63ac 100644 --- a/doc/Run_PyStan_in_Atom.rst +++ b/doc/Run_PyStan_in_Atom.rst @@ -7,7 +7,7 @@ PyStan doesn't automatically run in `Atom `_ even if we use scri Steps ------ -- Install PyStan as explained `here `_. +- Install PyStan as explained `here `_. - Install `Atom `_. Atom will be added to your path variable during the installation. - Launch `Atom `_ in your activated Stan environment as follows: @@ -20,7 +20,7 @@ Steps Test ------ -To check if you can now run PyStan in Atom, copy and run the example code from the `installation doc `_. +To check if you can now run PyStan in Atom, copy and run the example code from the `installation doc `_. >>> import pystan >>> model_code = 'parameters {real y;} model {y ~ normal(0,1);}' diff --git a/doc/index.rst b/doc/index.rst index bdd9f45a..3a2a8535 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -7,12 +7,15 @@ PyStan: The Python Interface to Stan ==================================== +.. tip:: PyStan 3 is available for Linux and macOS users. Visit the `PyStan 3 documentation `_ for details. PyStan 2 is not maintained. + PyStan provides an interface to `Stan `_, a package for Bayesian inference using the No-U-Turn sampler, a variant of Hamiltonian Monte Carlo. License: Open source, GPL3 + Documentation ------------- @@ -51,7 +54,7 @@ Important links --------------- - Source code repo: https://github.com/stan-dev/pystan -- HTML documentation: http://pystan.readthedocs.org +- HTML documentation: http://pystan2.readthedocs.org - Issue tracker: https://github.com/stan-dev/pystan/issues Related projects @@ -62,14 +65,15 @@ Related projects - hBayesDM: `hierarchical Bayesian modeling of Decision-Making tasks `_ by @CCS-Lab - Jupyter tool: `StanMagic `_ by @Arvinds-ds - Jupyter tool: `JupyterStan `_ by @janfreyberg +- Orbit: `Object-oRiented BayesIan Timeseries models `_ by @uber - Prophet: `Timeseries forecasting `_ by @facebook - Scikit-learn integration: `pystan-sklearn `_ by @rgerkin. Similar projects ---------------- -- PyMC: http://pymc-devs.github.io/pymc/ -- emcee: http://dan.iel.fm/emcee/current/ +- PyMC3: https://docs.pymc.io/ +- emcee: https://emcee.readthedocs.io/en/stable/ PyStan3 / Stan3 --------------- diff --git a/doc/release-howto.rst b/doc/release-howto.rst index 58ca67b5..a008b2d8 100644 --- a/doc/release-howto.rst +++ b/doc/release-howto.rst @@ -115,7 +115,7 @@ PyStan 2.19.1.1:: A list of changes is available in the customary location: - http://pystan.readthedocs.io/en/latest/whats_new.html + http://pystan2.readthedocs.io/en/latest/whats_new.html TODO ==== diff --git a/pystan/misc.py b/pystan/misc.py index 7241deb2..9853fff7 100644 --- a/pystan/misc.py +++ b/pystan/misc.py @@ -462,7 +462,10 @@ def _config_argss(chains, iter, warmup, thin, inits_specified = True if not inits_specified and isinstance(init, Callable): ## test if function takes argument named "chain_id" - if "chain_id" in inspect.getargspec(init).args: + if "chain_id" in ( + inspect.getfullargspec(init).args if hasattr(inspect, "getfullargspec") + else inspect.getargspec(init).args + ): inits = [init(chain_id=id) for id in chain_id] else: inits = [init()] * chains