Skip to content

Commit

Permalink
raise error for invalid args passed through dots
Browse files Browse the repository at this point in the history
  • Loading branch information
dustinvtran committed Nov 12, 2017
1 parent ade59cb commit a256063
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions R/sgd.R
Original file line number Diff line number Diff line change
Expand Up @@ -670,6 +670,10 @@ valid_implicit_control <- function(delta=30L, ...) {
#
# Args:
# delta: convergence criterion for the one-dimensional optimization
args <- list(...)
if (!is.null(names(args))) {
stop("Invalid args passed into sgd.control through dots")
}
if (!is.numeric(delta) || delta - as.integer(delta) != 0 || delta <= 0) {
stop("value of 'delta' must be integer > 0")
}
Expand Down

0 comments on commit a256063

Please sign in to comment.