posteriordb
posteriordb copied to clipboard
Extract model inputs directly from the compiler
This is an issue started from the following PR #192
Ping @mandel.
Thank you for opening this issue.
I have updated the fork of the Stan compiler to add an option --info which outputs on the standard output a JSON object containing information about the model. It currently generates an object a field inputs containing a dictionary where each entry corresponds to a variable in the data block. To each variable is associated an object with two fields:
type: the base type of the variable ("int"or"real").dimensions: the number of dimensions (0for a scalar,1for a vector or row vector, etc.).
The code is available in the info branch of the fork:
https://github.com/mandel/stanc3/tree/info
Thanks! I will try to add this to the documentation somehow. Thanks!