Skip to content

Commit

Permalink
Hotfix to handle input_seed being a matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelHoltonPrice authored May 27, 2024
1 parent 3a4e481 commit f307cd3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion R/data_io_functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -481,9 +481,10 @@ do_bayesian_inference <- function(data_dir,
set.seed(base_seed)
seed_mat <- matrix(sample.int(1000000,2*num_models),ncol=2)
} else if(is.matrix(input_seed)) {
if(dim(input_seed) != c(num_models,2))
if (nrow(input_seed) != num_models || ncol(input_seed) != 2) {
stop(paste0("If input_seed is a matrix, it must have dimensions ",
"num_models x 2 (see function details)"))
}
base_seed <- NA
seed_mat <- input_seed
} else {
Expand Down

0 comments on commit f307cd3

Please sign in to comment.