When I try to compile models in PyStan using IPython, I get numerous compiler warnings, beginning with…
In file included from /Library/Python/2.7/site-packages/numpy/core/include/numpy/arrayobject.h:4:
In file included from /Library/Python/2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:18:
In file included from /Library/Python/2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1809:
/Library/Python/2.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: "Using deprecated NumPy
API, disable it by " “#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION” [-W#warnings]
I’m not sure if this would help, but perhaps you should see what happens if you use Python 3 instead of Python 2.7. Try using Anaconda Python. As far as I know, Python 2.7 should work, but it may be enlightening to see if you get the same problems with a different Python installation.
Thanks so much for these helpful replies! I upgraded my Python with Conda and I’m now on Python 2.7.14, IPython 5.4.1, PyStan 2.17.0. Can’t upgrade any further for IPython on Python 2.7. I’m still getting warnings when I compile, but they’re somewhat reduced – full printout –
In file included from /var/folders/xz/45bxl3d12wz15ds352gsl0yr0000gn/T/tmpiUGODN/stanfit4anon_model_1521910521946302af05b50fa606e2ea_6169241267858442418.cpp:559:
In file included from /Users/epierson/anaconda2/lib/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:4:
In file included from /Users/epierson/anaconda2/lib/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:18:
In file included from /Users/epierson/anaconda2/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1809:
/Users/epierson/anaconda2/lib/python2.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning:
"Using deprecated NumPy API, disable it by " “#defining NPY_NO_DEPRECATED_API
NPY_1_7_API_VERSION” [-W#warnings] #warning "Using deprecated NumPy API, disable it by "
^
In file included from /Users/epierson/anaconda2/lib/python2.7/site-packages/pystan/stan_fit.hpp:22:
In file included from /Users/epierson/anaconda2/lib/python2.7/site-packages/pystan/stan/src/stan/services/diagnose/diagnose.hpp:10:
In file included from /Users/epierson/anaconda2/lib/python2.7/site-packages/pystan/stan/src/stan/model/test_gradients.hpp:7:
In file included from /Users/epierson/anaconda2/lib/python2.7/site-packages/pystan/stan/src/stan/model/log_prob_grad.hpp:4:
In file included from /Users/epierson/anaconda2/lib/python2.7/site-packages/pystan/stan/lib/stan_math/stan/math/rev/mat.hpp:12:
In file included from /Users/epierson/anaconda2/lib/python2.7/site-packages/pystan/stan/lib/stan_math/stan/math/prim/mat.hpp:298:
In file included from /Users/epierson/anaconda2/lib/python2.7/site-packages/pystan/stan/lib/stan_math/stan/math/prim/arr.hpp:38:
In file included from /Users/epierson/anaconda2/lib/python2.7/site-packages/pystan/stan/lib/stan_math/stan/math/prim/arr/functor/integrate_ode_rk45.hpp:17:
In file included from /Users/epierson/anaconda2/lib/python2.7/site-packages/pystan/stan/lib/stan_math/lib/boost_1.64.0/boost/numeric/odeint.hpp:61:
In file included from /Users/epierson/anaconda2/lib/python2.7/site-packages/pystan/stan/lib/stan_math/lib/boost_1.64.0/boost/numeric/odeint/util/multi_array_adaption.hpp:29:
In file included from /Users/epierson/anaconda2/lib/python2.7/site-packages/pystan/stan/lib/stan_math/lib/boost_1.64.0/boost/multi_array.hpp:21:
In file included from /Users/epierson/anaconda2/lib/python2.7/site-packages/pystan/stan/lib/stan_math/lib/boost_1.64.0/boost/multi_array/base.hpp:28:
/Users/epierson/anaconda2/lib/python2.7/site-packages/pystan/stan/lib/stan_math/lib/boost_1.64.0/boost/multi_array/concept_checks.hpp:42:43: warning:
unused typedef ‘index_range’ [-Wunused-local-typedef]
typedef typename Array::index_range index_range;
^
/Users/epierson/anaconda2/lib/python2.7/site-packages/pystan/stan/lib/stan_math/lib/boost_1.64.0/boost/multi_array/concept_checks.hpp:43:37: warning:
unused typedef ‘index’ [-Wunused-local-typedef]
typedef typename Array::index index;
^
/Users/epierson/anaconda2/lib/python2.7/site-packages/pystan/stan/lib/stan_math/lib/boost_1.64.0/boost/multi_array/concept_checks.hpp:53:43: warning:
unused typedef ‘index_range’ [-Wunused-local-typedef]
typedef typename Array::index_range index_range;
^
/Users/epierson/anaconda2/lib/python2.7/site-packages/pystan/stan/lib/stan_math/lib/boost_1.64.0/boost/multi_array/concept_checks.hpp:54:37: warning:
unused typedef ‘index’ [-Wunused-local-typedef]
typedef typename Array::index index;
And the code seems to run fine, so maybe this isn’t anything to worry about?
Also, I do not get these warnings when I run the same code in Python, not IPython.