qr

Function qr 

Source
pub fn qr<T: Scalar>(_tensor: &Tensor<T>) -> Result<QrResult<T>>
Expand description

Compute the QR decomposition of a batched matrix.

Input shape: (m, n, *). Must be column-major contiguous.

§Examples

use tenferro_linalg::qr;
use tenferro_tensor::{Tensor, MemoryOrder};
use tenferro_device::LogicalMemorySpace;

let a = Tensor::<f64>::zeros(&[4, 3],
    LogicalMemorySpace::MainMemory, MemoryOrder::ColumnMajor);
let result = qr(&a).unwrap();

§Errors

Returns an error if the input has fewer than 2 dimensions.