Skip to content

Commit

Permalink
fixed checks
Browse files Browse the repository at this point in the history
  • Loading branch information
pbiecek committed May 20, 2022
1 parent 733b5da commit f41ad09
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion R/misc_yhat.R
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ yhat.train <- function(X.model, newdata, ...) {

}
# fix for https://github.com/ModelOriented/DALEX/issues/150
if (class(response) == "data.frame") response <- as.matrix(response)
if (inherits(response, "data.frame")) response <- as.matrix(response)

response
}
Expand Down
4 changes: 2 additions & 2 deletions R/model_info.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#' was executed withing \code{explain} function. DALEX will recognize subtype on it's own.
#' @param ... - another arguments
#'
#' @details
#' @details
#' Currently supported packages are:
#' \itemize{
#' \item class \code{cv.glmnet} and \code{glmnet} - models created with \pkg{glmnet} package
Expand Down Expand Up @@ -284,7 +284,7 @@ print.model_info <- function(x, ...) {

get_pkg_ver_safe <- function(package) {
ver <- try(as.character(utils::packageVersion(package)), silent = TRUE)
if (class(ver) == "try-error") {
if (inherits(ver, "try-error")) {
ver <- "Unknown"
}
ver
Expand Down

0 comments on commit f41ad09

Please sign in to comment.