pub fn to_scalar<'a, D: Datum>(&'a self) -> TractResult<&D> {
        if self.datum_type() != D::datum_type() {
            bail!(
                "Incompatible datum type. Required {:?}, got {:?}",
                D::datum_type(),
                self.datum_type()
            );
        }
        if self.is_null() {
            bail!("Null tensor")
        }
        unsafe { Ok(&*(self.data.as_ptr() as *const D)) }
    }
/// Access the data as a scalar.
Access the data as a scalar.
Access the data as a scalar .
pub fn to_scalar<'a, D: Datum>(&'a self) -> TractResult<&D> {
        if self.datum_type() != D::datum_type() {
            bail!(
                "Incompatible datum type. Required {:?}, got {:?}",
                D::datum_type(),
                self.datum_type()
            );
        }
        if self.is_null() {
            bail!("Null tensor")
        }
        unsafe { Ok(&*(self.data.as_ptr() as *const D)) }
    }
pub fn to_scalar < ' a , D : Datum > ( & ' a self ) -> TractResult < & D > { if self . datum_type ( ) != D :: datum_type ( ) { bail ! ( " " D datum_type ( ) self datum_type ( ) ) ; } if self . is_null ( ) { bail ! ( " " ) } unsafe { Ok ( & * ( self . data . as_ptr ( ) as * const D ) ) } }
Access the data as a scalar.
Access the data as a scalar .
&'a self
&'a self