pub fn read_matrix_mmap<'t>(mmap: &'t MatFile) -> Result<ArrayViewMut2<'t, f64>> {
    unsafe {
        let new_slice= ::std::slice::from_raw_parts_mut(mmap.2.ptr() as *mut f64, mmap.2.len()/8);
        Ok(ArrayViewMut2::from_shape([mmap.0, mmap.1], new_slice)?)
    }
}
/// Load a Numpy matrix as an mmap (Part 2)
///
/// You need to know the number of dimensions at compile time so for convenience, we assume you
/// need a matrix. Also, this method is even faster than read_matrix but only works for native byte
/// order.
///
/// This is different than you might expect. The file you read from must outlive the array,
/// because the array is based on an mmap of that file (so that it doesn't read it into memory).
Load a Numpy matrix as an mmap (Part 2)
You need to know the number of dimensions at compile time so for convenience, we assume you
need a matrix. Also, this method is even faster than read_matrix but only works for native byte
order.

This is different than you might expect. The file you read from must outlive the array,
because the array is based on an mmap of that file (so that it doesn't read it into memory).
Load a Numpy matrix as an mmap ( Part 2 ) You need to know the number of dimensions at compile time so for convenience we assume you need a matrix . Also this method is even faster than read_matrix but only works for native byte order . This is different than you might expect . The file you read from must outlive the array because the array is based on an mmap of that file ( so that it doesn ' t read it into memory ) .
pub fn read_matrix_mmap<'t>(mmap: &'t MatFile) -> Result<ArrayViewMut2<'t, f64>> {
    unsafe {
        let new_slice= ::std::slice::from_raw_parts_mut(mmap.2.ptr() as *mut f64, mmap.2.len()/8);
        Ok(ArrayViewMut2::from_shape([mmap.0, mmap.1], new_slice)?)
    }
}
pub fn read_matrix_mmap < ' t > ( mmap : & ' t MatFile ) -> Result < ArrayViewMut2 < ' t , f64 > > { unsafe { let new_slice = :: std :: slice :: from_raw_parts_mut ( mmap . 2 . ptr ( ) as * mut f64 , mmap . 2 . len ( ) / 8 ) ; Ok ( ArrayViewMut2 :: from_shape ( [ mmap . 0 , mmap . 1 ] , new_slice ) ? ) } }
Load a Numpy matrix as an mmap (Part 2)
You need to know the number of dimensions at compile time so for convenience, we assume you
need a matrix.
Load a Numpy matrix as an mmap ( Part 2 ) You need to know the number of dimensions at compile time so for convenience we assume you need a matrix .
mmap
&'t MatFile
mmap
&'t MatFile