Skip to content

Commit

Permalink
oops
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilHvitfeldt committed Oct 18, 2024
1 parent 3b28b51 commit f72feb2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sparse-dummy.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ SEXP ffi_sparse_dummy(SEXP x, SEXP lvls, SEXP counts, SEXP one_hot) {

// Itterate over input, find its position index, and place the position value
// at the index. Increment specific index.
if (R_isTRUE(one_hot)) {
if ((Rboolean) LOGICAL_ELT(one_hot, 0) == TRUE) {
for (R_xlen_t i = 0; i < len; ++i) {
int current_val = v_x[i] - 1;

Expand Down Expand Up @@ -154,7 +154,7 @@ SEXP ffi_sparse_dummy_na(SEXP x, SEXP lvls, SEXP counts, SEXP one_hot) {
// Itterate over input, find its position index, and place the position value
// at the index. Increment specific index.

if (R_isTRUE(one_hot)) {
if ((Rboolean) LOGICAL_ELT(one_hot, 0) == TRUE) {
for (R_xlen_t i = 0; i < len; ++i) {
int current_val = v_x[i];

Expand Down

0 comments on commit f72feb2

Please sign in to comment.