pub fn element_count(shape: &[usize]) -> Result<usize>Expand description
Checked product of a tensor’s dimensions.
Scalars ([]) have one element; any zero dimension makes the tensor empty.
Returns an error when a nonempty tensor’s element count overflows usize.