pub fn span(&self) -> usize {
        match self {
            Shape::Scalar(_) => 1,
            Shape::Vector([n]) => *n as usize,
            Shape::Matrix([n, m]) => *n as usize * *m as usize,
            Shape::Tensor(vals) => vals.iter().map(|x| *x as usize).product(),
        }
    }
/// Total number of elements in an array this shape spans.
///
/// For NdArrays this is equal to the `len` of its value array
Total number of elements in an array this shape spans.
For NdArrays this is equal to the `len` of its value array
Total number of elements in an array this shape spans . For NdArrays this is equal to the ` len ` of its value array
pub fn span(&self) -> usize {
        match self {
            Shape::Scalar(_) => 1,
            Shape::Vector([n]) => *n as usize,
            Shape::Matrix([n, m]) => *n as usize * *m as usize,
            Shape::Tensor(vals) => vals.iter().map(|x| *x as usize).product(),
        }
    }
pub fn span ( & self ) -> usize { match self { Shape :: Scalar ( _ ) => 1 , Shape :: Vector ( [ n ] ) => * n as usize , Shape :: Matrix ( [ n , m ] ) => * n as usize * * m as usize , Shape :: Tensor ( vals ) => vals . iter ( ) . map ( | x | * x as usize ) . product ( ) , } }
Total number of elements in an array this shape spans.
Total number of elements in an array this shape spans .
&self