From 03fc897295eb4339cb91733dc0a3df18d496d806 Mon Sep 17 00:00:00 2001 From: Sebastian Funk Date: Wed, 7 Aug 2024 23:15:06 +0100 Subject: [PATCH] hotfix: correctly identify constrained dists --- R/dist_spec.R | 3 +++ 1 file changed, 3 insertions(+) diff --git a/R/dist_spec.R b/R/dist_spec.R index 93b1cd3ce..8016c8f32 100644 --- a/R/dist_spec.R +++ b/R/dist_spec.R @@ -791,6 +791,9 @@ is_constrained <- function(x, ...) { #' # both distributions are constrained and therefore so is the sum #' is_constrained(dist1 + dist2) is_constrained.dist_spec <- function(x, ...) { + if (get_distribution(x) %in% c("nonparametric", "fixed")) { + return(TRUE) + } tolerance <- attr(x, "tolerance") tol_constrained <- !is.null(tolerance) && tolerance > 0 max <- attr(x, "max")