From 50616d0d070913c2112ac12b5b3f2a312f41107e Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Mon, 25 Sep 2023 18:37:54 +0300 Subject: [PATCH] Fix dim check --- R/args.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/args.R b/R/args.R index 56d08611..a2a31af0 100644 --- a/R/args.R +++ b/R/args.R @@ -829,7 +829,7 @@ process_init_list <- function(init, num_procs, model_variables = NULL) { for (par_name in parameter_names[is_parameter_value_supplied]) { # Make sure that initial values for single-element containers don't get # unboxed when writing to JSON - if (model_variables$parameters[[par_name]]$dimensions == 1 && is.null(attr(init[[i]][[par_name]], "dim"))) { + if (model_variables$parameters[[par_name]]$dimensions == 1 && length(init[[i]][[par_name]]) == 1) { init[[i]][[par_name]] <- array(init[[i]][[par_name]], dim = 1) } }