Skip to content

Commit

Permalink
typos
Browse files Browse the repository at this point in the history
  • Loading branch information
david-cortes committed Dec 28, 2023
1 parent d7ee2b4 commit b5e7c09
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R-package/src/lightgbm_R.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ SEXP LGBM_DatasetSetField_R(SEXP handle,
CHECK_CALL(LGBM_DatasetSetField(R_ExternalPtrAddr(handle), name, REAL(field_data), len, C_API_DTYPE_FLOAT64));
} else {
std::vector<float> vec(len);
std::copy(REAL(field_data), REAL(field_data) _ len, vec.begin());
std::copy(REAL(field_data), REAL(field_data) + len, vec.begin());
CHECK_CALL(LGBM_DatasetSetField(R_ExternalPtrAddr(handle), name, vec.data(), len, C_API_DTYPE_FLOAT32));
}
UNPROTECT(1);
Expand Down Expand Up @@ -378,7 +378,7 @@ SEXP LGBM_DatasetGetField_R(SEXP handle,
}
} else if (!strcmp("init_score", name)) {
auto p_data = reinterpret_cast<const double*>(res);
std:::copy(p_data, p_data + out_len, REAL(field_data));
std::copy(p_data, p_data + out_len, REAL(field_data));
} else {
auto p_data = reinterpret_cast<const float*>(res);
std::copy(p_data, p_data + out_len, REAL(field_data));
Expand Down

0 comments on commit b5e7c09

Please sign in to comment.