pub fn checked_shape_product(
op: &'static str,
role: &'static str,
shape: &[usize],
) -> Result<usize>Expand description
Compute a shape product with overflow reported as a typed tensor error.
ยงExamples
use tenferro_tensor::validate::checked_shape_product;
assert_eq!(checked_shape_product("zeros", "shape", &[2, 3])?, 6);