Skip to content

Commit a15c129

Browse files
committed
Use dtype constant for predict [skip ci]
1 parent 4af0fe2 commit a15c129

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/lightgbm/inner_predictor.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def inner_predict_array2d(input, start_iteration, num_iteration, predict_type)
105105

106106
out_num_preds = ::FFI::MemoryPointer.new(:int64)
107107
out_result = ::FFI::MemoryPointer.new(:double, n_preds)
108-
safe_call FFI.LGBM_BoosterPredictForMat(@handle, data, 1, input.count, input.first.count, 1, predict_type, start_iteration, num_iteration, @pred_parameter, out_num_preds, out_result)
108+
safe_call FFI.LGBM_BoosterPredictForMat(@handle, data, FFI::C_API_DTYPE_FLOAT64, input.count, input.first.count, 1, predict_type, start_iteration, num_iteration, @pred_parameter, out_num_preds, out_result)
109109
if n_preds != out_num_preds.read_int64
110110
raise Error, "Wrong length for predict results"
111111
end

0 commit comments

Comments
 (0)