Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[R] Fix 32-bit build #3307

Merged
merged 3 commits into from
Aug 15, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion R-package/R/lgb.Booster.R
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Booster <- R6::R6Class(

# Create parameters and handle
params <- append(params, list(...))
handle <- 0.0
handle <- 0L
guolinke marked this conversation as resolved.
Show resolved Hide resolved

# Attempts to create a handle for the dataset
try({
Expand Down
2 changes: 1 addition & 1 deletion R-package/R/lgb.Dataset.R
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ Dataset <- R6::R6Class(
if (!is.null(private$reference)) {
ref_handle <- private$reference$.__enclos_env__$private$get_handle()
}
handle <- NA_real_
handle <- 0L
jameslamb marked this conversation as resolved.
Show resolved Hide resolved
guolinke marked this conversation as resolved.
Show resolved Hide resolved

# Not subsetting
if (is.null(private$used_indices)) {
Expand Down
2 changes: 1 addition & 1 deletion R-package/tests/testthat/test_dataset.R
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ test_that("lgb.Dataset: nrow is correct for a very sparse matrix", {

test_that("lgb.Dataset: Dataset should be able to construct from matrix and return non-null handle", {
rawData <- matrix(runif(1000L), ncol = 10L)
handle <- NA_real_
handle <- 0L
guolinke marked this conversation as resolved.
Show resolved Hide resolved
ref_handle <- NULL
handle <- lightgbm:::lgb.call(
"LGBM_DatasetCreateFromMat_R"
Expand Down