Skip to content

Commit bc27e2b

Browse files
Merge pull request #1172 from tidymodels/optim-to-sparse
reduce overhead of `to_sparse_data_frame()`
2 parents f66a8f9 + 2ccd336 commit bc27e2b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

R/sparsevctrs.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ is_sparse_tibble <- function(x) {
1818
}
1919

2020
materialize_sparse_tibble <- function(x, object, input) {
21-
if ((!allow_sparse(object)) && is_sparse_tibble(x)) {
21+
if (is_sparse_tibble(x) && (!allow_sparse(object))) {
2222
cli::cli_warn(
2323
"{.arg {input}} is a sparse tibble, but {.fn {class(object)[1]}} with
2424
engine {.code {object$engine}} doesn't accept that. Converting to

0 commit comments

Comments
 (0)