Skip to content

Commit

Permalink
hotfix: bound delays before getting max
Browse files Browse the repository at this point in the history
  • Loading branch information
sbfnk committed Aug 2, 2024
1 parent 06aef8f commit a3a06df
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion R/create.R
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,8 @@ create_stan_delays <- function(..., time_points = 1L) {
## discretise
delays <- map(delays, discretise, strict = FALSE)
## get maximum delays
max_delay <- unname(as.numeric(flatten(map(delays, max))))
bounded_delays <- map(delays, function(x) discretise(fix_dist(x)))
max_delay <- unname(as.numeric(flatten(map(bounded_delays, max))))
## number of different non-empty types
type_n <- vapply(delays, ndist, integer(1))
## assign ID values to each type
Expand Down

0 comments on commit a3a06df

Please sign in to comment.