pub fn elem_count(shape: &[usize]) -> u64
Product of shape dimensions; an empty shape is a scalar with one element.