diff --git a/DESCRIPTION b/DESCRIPTION index 6180f933a..dd124183c 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -2,8 +2,8 @@ Package: brms Encoding: UTF-8 Type: Package Title: Bayesian Regression Models using 'Stan' -Version: 2.20.2 -Date: 2023-09-09 +Version: 2.20.3 +Date: 2023-09-14 Authors@R: c(person("Paul-Christian", "Bürkner", email = "paul.buerkner@gmail.com", role = c("aut", "cre")), diff --git a/R/predictor.R b/R/predictor.R index 4cc410693..475242e54 100644 --- a/R/predictor.R +++ b/R/predictor.R @@ -59,7 +59,12 @@ predictor.bprepnl <- function(prep, i = NULL, fprep = NULL, ...) { # when 'nlform' must be evaluated jointly across observations # and hence 'loop' had been set to FALSE for (i in seq_along(args)) { - args[[i]] <- split(args[[i]], row(args[[i]])) + old_dim <- dim(args[[i]]) + args[[i]] <- split(args[[i]], slice.index(args[[i]], 1)) + if (length(old_dim) > 2L) { + # split drops array dimensions which need to be restored + args[[i]] <- lapply(args[[i]], "dim<-", old_dim[-1]) + } } .fun <- function(...) eval(prep$nlform, list(...)) eta <- try( diff --git a/man/save_pars.Rd b/man/save_pars.Rd index 0a2ef4895..1fefbd19b 100644 --- a/man/save_pars.Rd +++ b/man/save_pars.Rd @@ -36,7 +36,7 @@ A list of class \code{"save_pars"}. } \description{ Control which (draws of) parameters should be saved in a \pkg{brms} -model. The output of this function is ment for usage in the +model. The output of this function is meant for usage in the \code{save_pars} argument of \code{\link{brm}}. } \examples{