You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When calling $draws() on a fit object whose model has complex or tuple types in it I receive warning messages about NA's being made for the variable sizes.
# I put this in the tests/testthat/resources/stan folder
mod_params <- testing_model("parameter_types")
fit <- mod_params$pathfinder(data=data_list, seed=1234, refresh = 0)
foo = fit$draws(format = "df")
# Warning messages:
# 1: In variable_dims(metadata$variables) : NAs introduced by coercion
# 2: In variable_dims(metadata$variables) : NAs introduced by coercion
# 3: In variable_dims(metadata$variables) : NAs introduced by coercion
# 4: In variable_dims(metadata$variables) : NAs introduced by coercion
# 5: In variable_dims(metadata$variables) : NAs introduced by coercion
meta = fit$metadata()
meta$stan_variable_sizes
## Output
$lp_approx__
[1] 1
$lp__
[1] 1
$real_p
[1] 1
$vector_p
[1] 2
$matrix_p
[1] 2 2
$array_matrix_p
[1] 2 2 2
$corr_p
[1] 2 2
$complex_p
[1] NA
$complex_matrix_p
[1] 2 2 NA
$complex_vector_p
[1] 4 NA
$`tuple_int_vector_arraymatrix_complex_p:1`
[1] 1
$`tuple_int_vector_arraymatrix_complex_p:2`
[1] 3
$`tuple_int_vector_arraymatrix_complex_p:3`
[1] 2 2 2
$`tuple_int_vector_arraymatrix_complex_p:4`
[1] NA
$arraytuple_big_p
[1] NA NA 2 2
Expected behavior
Tuples and complex types would have the correct size
Describe the bug
When calling
$draws()
on a fit object whose model has complex or tuple types in it I receive warning messages about NA's being made for the variable sizes.To Reproduce
I made the stan program below to test this
You can get the error with the following
Expected behavior
Tuples and complex types would have the correct size
Operating system
Linux redhat
CmdStanR version number
master 28329d7
Additional context
I found this while working on the functions for adding pathfinder types
The text was updated successfully, but these errors were encountered: