# Pystan2 to pystan3

**URL:** <https://discourse.mc-stan.org/t/pystan2-to-pystan3/35273>\
**Category:** Modeling\
**Created:** [May 27, 2024, 12:55pm UTC](https://discourse.mc-stan.org/t/pystan2-to-pystan3/35273 "2024-05-27T12:55:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shaikh\_Moin](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/shaikh_moin/32/18547_2.png) [@Shaikh\_Moin](https://discourse.mc-stan.org/u/Shaikh_Moin)\
**Post date:** [May 27, 2024, 12:55pm UTC](https://discourse.mc-stan.org/t/pystan2-to-pystan3/35273/1 "2024-05-27T12:55:16Z")

</div>

# pystan2

model\_fit = model.sampling(data=data\_dict, iter=1000, chains=6, warmup=400, n\_jobs=-1, seed=np.random.randint(100),  
control=dict(max\_treedepth=12, adapt\_delta=0.80), check\_hmc\_diagnostics=True)

# i tried to change this in pystan3 as

posterior = stan.build(model\_code, data = data\_dict)  
model\_fit = posterior.sample( num\_chains=6)

i want to use exact same arguments in pystan3.I have gone through available documentations but could not resolve . please help me as soon as possible
