Skip to content

Commit

Permalink
Merge pull request #1172 from tidymodels/optim-to-sparse
Browse files Browse the repository at this point in the history
reduce overhead of `to_sparse_data_frame()`
  • Loading branch information
EmilHvitfeldt authored Sep 5, 2024
2 parents f66a8f9 + 2ccd336 commit bc27e2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/sparsevctrs.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ is_sparse_tibble <- function(x) {
}

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

0 comments on commit bc27e2b

Please sign in to comment.