stan-dev / pystan

PyStan, a Python interface to Stan, a platform for statistical modeling. Documentation: https://pystan.readthedocs.io
ISC License
342 stars 59 forks source link

feat: Convert numpy integers in `data` to Python int #327

Closed riddell-stan closed 3 years ago

riddell-stan commented 3 years ago

This commit makes it easier to use PyStan with numpy integer types. Numpy integers will be silently converted to Python ints. There is no loss of precision, risk of overflow, etc.

Note that this adds support in PyStan only for numpy integer types. Floats are more complicated because Python floats are not necessarily compatible with numpy floats (e.g., np.float128).

Closes #326