From 0c7e4c96bc59ed76f7f90e5964ad6b6c7ab7f6b7 Mon Sep 17 00:00:00 2001 From: Koichi Akabe Date: Thu, 28 Dec 2023 16:52:16 +0900 Subject: [PATCH] Use f32::NAN as a missing value --- src/dmatrix.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dmatrix.rs b/src/dmatrix.rs index f29b5d0..212b8b7 100644 --- a/src/dmatrix.rs +++ b/src/dmatrix.rs @@ -112,7 +112,7 @@ impl DMatrix { xgb_call!(xgboost_sys::XGDMatrixCreateFromMat(data.as_ptr(), num_rows as xgboost_sys::bst_ulong, (data.len() / num_rows) as xgboost_sys::bst_ulong, - 0.0, // TODO: can values be missing here? + f32::NAN, &mut handle))?; Ok(DMatrix::new(handle)?) }