Closed
Description
To Reproduce
library(tidyverse)
library(cmdstanr)
cmdstanr::write_stan_file(
code = "data{ int n; int k; } \n parameters{ matrix[n,k] x ;}"
, dir = './'
, basename = 'mod'
)
mod = cmdstan_model(
'mod.stan'
, compile_model_methods = T
)
tmp = mod$sample(
data = lst(n=3,k=4)
, chains = 1
, adapt_engaged = 0
, iter_warmup = 0
, iter_sampling = 1
)
tmp$variable_skeleton() #
yields:
$x
[1] 0 0 0
Expected behavior
x should be a 3x4 array, or if skeleton is expected to flatten all containers to a vector, a 12 element vector.
CmdStanR version number
0.6.0