Skip to content

Commit

Permalink
hotfix: correctly identify constrained dists
Browse files Browse the repository at this point in the history
  • Loading branch information
sbfnk committed Aug 7, 2024
1 parent a3a06df commit 03fc897
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions R/dist_spec.R
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 03fc897

Please sign in to comment.