pub fn linear_index(indices: &[usize], shape: &[usize]) -> usize
Compute the C-order (row-major) flat index from multi-dimensional indices.
Panics in debug mode if indices.len() != shape.len().
indices.len() != shape.len()