Skip to content

Commit

Permalink
Allow for multiple distributions
Browse files Browse the repository at this point in the history
  • Loading branch information
robjhyndman committed Nov 13, 2024
1 parent 1850e02 commit 3312024
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/surprisals.R
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ surprisals.default <- function(
den <- den[[1]]
}
scores <- -den
if (loo & stats::family(distribution) == "kde") {
if (loo & all(stats::family(distribution) == "kde")) {
n <- NROW(object)
d <- NCOL(object)
if (d == 1L) {
Expand Down

0 comments on commit 3312024

Please sign in to comment.