diff --git a/R/surprisals.R b/R/surprisals.R index c7b1eaf..6a14d53 100644 --- a/R/surprisals.R +++ b/R/surprisals.R @@ -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) {