aesara.tensor.nlinalg.qr(a, mode='reduced')[source]#

Computes the QR decomposition of a matrix. Factor the matrix a as qr, where q is orthonormal and r is upper-triangular.

  • a (array_like, shape (M, N)) – Matrix to be factored.

  • mode ({'reduced', 'complete', 'r', 'raw'}, optional) –

    If K = min(M, N), then


    returns q, r with dimensions (M, K), (K, N)


    returns q, r with dimensions (M, M), (M, N)


    returns r only with dimensions (K, N)


    returns h, tau with dimensions (N, M), (K,)

    Note that array h returned in ‘raw’ mode is transposed for calling Fortran.

    Default mode is ‘reduced’


  • q (matrix of float or complex, optional) – A matrix with orthonormal columns. When mode = ‘complete’ the result is an orthogonal/unitary matrix depending on whether or not a is real/complex. The determinant may be either +/- 1 in that case.

  • r (matrix of float or complex, optional) – The upper-triangular matrix.