diff --git a/src/base/indexing.rs b/src/base/indexing.rs index de48a67c..c2bb48ff 100644 --- a/src/base/indexing.rs +++ b/src/base/indexing.rs @@ -567,7 +567,10 @@ where #[doc(hidden)] #[inline(always)] unsafe fn get_unchecked(self, matrix: &'a Matrix) -> Self::Output { - matrix.data.get_unchecked_linear(self) + let nrows = matrix.shape().0; + let row = self % nrows; + let col = self / nrows; + matrix.data.get_unchecked(row, col) } } diff --git a/src/base/matrix_slice.rs b/src/base/matrix_slice.rs index 261d41e2..5fbd4b01 100644 --- a/src/base/matrix_slice.rs +++ b/src/base/matrix_slice.rs @@ -73,7 +73,6 @@ macro_rules! slice_storage_impl( S: $Storage, RStride: Dim, CStride: Dim { - $T::from_raw_parts(storage.$get_addr(start.0, start.1), shape, strides) } }