You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After upgrading to pystan 3, I noticed that I am no longer able to run a number of older models containing vectors in the data block that may be length 0. For instance, in older versions of pystan (2.19.0.0), I might declare a model with a data block containing the following variables:
data {
int<lower=0, upper=1> nb;
int<lower=1> alpha[nb];
...
}
...
And then pass the following entries in a data dict in order to fit the model:
As of upgrading to Pystan 3.1.1, attempting to do so yields the following error:
RuntimeError: Error calling get_param_names: `Exception: int variable contained non-int values; processing stage=data initialization; variable name=alpha; base type=int (in '/var/folders/cz/tz9nr4710px51vhl4kq588jr0001bz/T/httpstan_g7gn5td2/model_4zofs5uu.stan', line 8, column 4 to column 27)`
Perhaps this is still possible through some other means, but I cannot find anything in the pystan 3 documentation about how to provide zero-length vectors as inputs.
I am working on Mac OS Catalina (10.15.7) with Python 3.7.9 and pystan 3.1.1.
The text was updated successfully, but these errors were encountered:
Thanks. This is a known issue. But it's one we haven't been tracking as clearly as we should.
To solve this problem, httpstan needs to get input type information from stanc3 somehow. There may be an open issue or two which can be linked to this.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
After upgrading to pystan 3, I noticed that I am no longer able to run a number of older models containing vectors in the data block that may be length 0. For instance, in older versions of pystan (2.19.0.0), I might declare a model with a data block containing the following variables:
And then pass the following entries in a data dict in order to fit the model:
As of upgrading to Pystan 3.1.1, attempting to do so yields the following error:
Perhaps this is still possible through some other means, but I cannot find anything in the pystan 3 documentation about how to provide zero-length vectors as inputs.
I am working on Mac OS Catalina (10.15.7) with Python 3.7.9 and pystan 3.1.1.
The text was updated successfully, but these errors were encountered: