The following Python code assumes the usage of pystan 2. However, when running it with pystan 3, it raises an error stating that algorithm='Fixed_param' is unknown. In the case of pystan 3, what modifications are required apart from changing import pystan to import stan and pystan.StanModel to stan.build?
import stan
with open('ben_files.stan', 'r') as f:
ben = f.read()
data_list = {'n': 100, 'p': M, 'c': N, 'k': r}
posterior = stan.build(model_code=ben)
fit = posterior.sample(data=data_list)
What other modifications are necessary for using pystan 3 instead of pystan 2, apart from the ones mentioned above (import statements and replacing pystan.StanModel with stan.build)?