Skip to content

Commit e33922d

Browse files
montanalowMontana Low
authored and
Montana Low
committed
wut wut
1 parent 3e536dd commit e33922d

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/dmatrix.rs

+3-5
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@ static KEY_BASE_MARGIN: &str = "base_margin";
6161
/// ```
6262
/// use xgboost::DMatrix;
6363
///
64-
/// let indptr = &[0, 2, 3, 6];
64+
/// let indptr = &[0, 1, 2, 6];
6565
/// let indices = &[0, 2, 2, 0, 1, 2];
6666
/// let data = &[1.0, 2.0, 3.0, 4.0, 5.0, 6.0];
67-
/// let dmat = DMatrix::from_csr(indptr, indices, data, None).unwrap();
67+
/// let dmat = DMatrix::from_csc(indptr, indices, data, None).unwrap();
6868
/// assert_eq!(dmat.shape(), (3, 3));
6969
/// ```
7070
#[derive(Debug)]
@@ -199,10 +199,8 @@ impl DMatrix {
199199
debug!("Loading DMatrix from: {}", path.as_ref().display());
200200
let mut handle = ptr::null_mut();
201201
let fname = ffi::CString::new(path.as_ref().as_os_str().as_bytes()).unwrap();
202-
let silent = true;
203-
xgb_call!(xgboost_sys::XGDMatrixCreateFromFile(
202+
xgb_call!(xgboost_sys::XGDMatrixCreateFromURI(
204203
fname.as_ptr(),
205-
silent as i32,
206204
&mut handle
207205
))?;
208206
DMatrix::new(handle)

0 commit comments

Comments
 (0)