This currently throws an error when parsing the stan variable names:
import nutpie
code = """
parameters {
array[2, 3] tuple(matrix[5, 7], real) yi;
}
model {
for (i in 1:2) {
for (j in 1:3) {
yi[i, j].2 ~ normal(-j - 3 * i, 0.1);
for (k in 1:5) {
for (m in 1:7) {
yi[i, j].1[k, m] ~ normal(m + 7 * k + 7 * 5 * j + 7 * 5 * 3 * i, 0.1);
}
}
}
}
}
"""
compiled = nutpie.compile_stan_model(code=code)
tr = nutpie.sample(compiled)
means = tr.posterior.mean(["draw", "chain"])