Skip to content

Commit

Permalink
Avoid using infinite n_max values
Browse files Browse the repository at this point in the history
  • Loading branch information
elipousson committed Mar 18, 2024
1 parent 25cf243 commit 9c130e8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion R/arc-select.R
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,8 @@ validate_n_feats <- function(
error_call = rlang::caller_env()
) {
# if n_max is provided need to reduce the number of pages
if (is.null(n_feats) || (n_feats > n_max)) {
if (is.null(n_feats) || (!is.infinite(n_max) && (n_feats > n_max))) {
# FIXME: Consider adding a warning if n_max is used
n_feats <- n_max
}

Expand Down

0 comments on commit 9c130e8

Please sign in to comment.