Trait MatrixUnary

Source
pub trait MatrixUnary: NDArray + Debug {
    type Diag: Access<Self::DType>;

    // Required method
    fn diag(
        self,
    ) -> Result<Array<Self::DType, Self::Diag, Self::Platform>, Error>;
}
Expand description

Matrix unary operations

Required Associated Types§

Source

type Diag: Access<Self::DType>

Required Methods§

Source

fn diag(self) -> Result<Array<Self::DType, Self::Diag, Self::Platform>, Error>

Construct an operation to read the diagonal(s) of this matrix or batch of matrices. This will return an error if the last two dimensions of the batch are unequal.

Implementors§