diff --git a/src/structs/dmat.rs b/src/structs/dmat.rs index d2c86acd..3a176398 100644 --- a/src/structs/dmat.rs +++ b/src/structs/dmat.rs @@ -559,7 +559,7 @@ impl RowSlice> for DMat { assert!(col_start < col_end); assert!(col_end <= self.ncols); let mut slice : DVec = unsafe { - DVec::new_uninitialized(self.nrows) + DVec::new_uninitialized(col_end - col_start) }; let mut slice_idx = 0; for col_id in col_start..col_end {