Fix wrong allocated vector length in RowSlice
The length of the returned DVec should correspond to the the number of elements in the slice and not the number of rows in the matrix.
This commit is contained in:
parent
5e41fbfe2a
commit
043d7ab108
|
@ -559,7 +559,7 @@ impl<N: Copy> RowSlice<DVec<N>> for DMat<N> {
|
|||
assert!(col_start < col_end);
|
||||
assert!(col_end <= self.ncols);
|
||||
let mut slice : DVec<N> = 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 {
|
||||
|
|
Loading…
Reference in New Issue