Skip to content

Instantly share code, notes, and snippets.

Last active Jun 9, 2021
What would you like to do?
from cmdstanpy import CmdStanModel
import os
with open("test.stan","w") as f:
data {
parameters {
real A;
model {
A ~ normal(0,1);
if(1<A)reject("to put some message to stderr");
stanModel = CmdStanModel(stan_file="test.stan")
fit=stanModel.sample(data={},iter_warmup=100,iter_sampling=10000,show_progress=True) #or show_prgress="notebook"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment