pub fn last_two(&self) -> Option<[u32; 2]> {
        match self {
            Shape::Scalar(_) => None,
            Shape::Vector(_) => None,
            Shape::Matrix(s) => Some(*s),
            Shape::Tensor(shp) => {
                let len = shp.len();
                debug_assert!(len >= 3);
                let [n, m] = [shp[len - 2], shp[len - 1]];
                Some([n, m])
            }
        }
    }
/// Return the last two dimensions. Effectively the shape of the matrices contained in the
/// shape.
Return the last two dimensions. Effectively the shape of the matrices contained in the
shape.
Return the last two dimensions . Effectively the shape of the matrices contained in the shape .
pub fn last_two(&self) -> Option<[u32; 2]> {
        match self {
            Shape::Scalar(_) => None,
            Shape::Vector(_) => None,
            Shape::Matrix(s) => Some(*s),
            Shape::Tensor(shp) => {
                let len = shp.len();
                debug_assert!(len >= 3);
                let [n, m] = [shp[len - 2], shp[len - 1]];
                Some([n, m])
            }
        }
    }
pub fn last_two ( & self ) -> Option < [ u32 ; 2 ] > { match self { Shape :: Scalar ( _ ) => None , Shape :: Vector ( _ ) => None , Shape :: Matrix ( s ) => Some ( * s ) , Shape :: Tensor ( shp ) => { let len = shp . len ( ) ; debug_assert ! ( len 3 ) ; let [ n , m ] = [ shp [ len - 2 ] , shp [ len - 1 ] ] ; Some ( [ n , m ] ) } } }
Return the last two dimensions.
Return the last two dimensions .
&self