Skip to content

Commit

Permalink
Merge pull request #350 from n-kall/validate_weights-fix
Browse files Browse the repository at this point in the history
Validate weights fix
  • Loading branch information
paul-buerkner authored Mar 6, 2024
2 parents 206f2cc + 0a5a29c commit 5403ae5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/weight_draws.R
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ weights.draws <- function(object, log = FALSE, normalize = TRUE, ...) {

# validate weights and return log weights
validate_weights <- function(weights, draws, log = FALSE) {
checkmate::assert_numeric(weights)
checkmate::assert_numeric(weights, any.missing = FALSE)
checkmate::assert_flag(log)
if (length(weights) != ndraws(draws)) {
stop_no_call("Number of weights must match the number of draws.")
Expand Down

0 comments on commit 5403ae5

Please sign in to comment.