Skip to content

Commit 4083321

Browse files
committed
Merge branch 'sparsity' of https://github.com/tidymodels/parsnip into sparsity
2 parents 078d10c + bb25ada commit 4083321

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

R/fit.R

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -370,9 +370,9 @@ check_xy_interface <- function(x, y, cl, model) {
370370

371371

372372
if (sparse_ok) {
373-
matrix_interface <- !is.null(x) & !is.null(y) && (is.matrix(x) | sparse_x)
373+
matrix_interface <- !is.null(x) && !is.null(y) && (is.matrix(x) | sparse_x)
374374
} else {
375-
matrix_interface <- !is.null(x) & !is.null(y) && is.matrix(x)
375+
matrix_interface <- !is.null(x) && !is.null(y) && is.matrix(x)
376376
}
377377

378378
df_interface <- !is.null(x) & !is.null(y) && is.data.frame(x)
@@ -408,4 +408,3 @@ print.model_fit <- function(x, ...) {
408408
}
409409
invisible(x)
410410
}
411-

0 commit comments

Comments
 (0)