Skip to content

Commit 3e47553

Browse files
committed
fix issue #1540
1 parent 2155a6f commit 3e47553

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ Package: brms
22
Encoding: UTF-8
33
Type: Package
44
Title: Bayesian Regression Models using 'Stan'
5-
Version: 2.20.2
6-
Date: 2023-09-09
5+
Version: 2.20.3
6+
Date: 2023-09-14
77
Authors@R:
88
c(person("Paul-Christian", "Bürkner", email = "paul.buerkner@gmail.com",
99
role = c("aut", "cre")),

R/predictor.R

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,12 @@ predictor.bprepnl <- function(prep, i = NULL, fprep = NULL, ...) {
5959
# when 'nlform' must be evaluated jointly across observations
6060
# and hence 'loop' had been set to FALSE
6161
for (i in seq_along(args)) {
62-
args[[i]] <- split(args[[i]], row(args[[i]]))
62+
old_dim <- dim(args[[i]])
63+
args[[i]] <- split(args[[i]], slice.index(args[[i]], 1))
64+
if (length(old_dim) > 2L) {
65+
# split drops array dimensions which need to be restored
66+
args[[i]] <- lapply(args[[i]], "dim<-", old_dim[-1])
67+
}
6368
}
6469
.fun <- function(...) eval(prep$nlform, list(...))
6570
eta <- try(

man/save_pars.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)