Skip to main content

flat_index

Function flat_index 

Source
pub fn flat_index(indices: &[usize], shape: &[usize]) -> Result<usize, String>
Expand description

Compute the flat index from multi-dimensional indices (row-major).