numpy.linalg.qr()

numpy.linalg.qr

numpy.linalg.qr(a, mode='reduced') [source]

Compute the qr factorization of a matrix.

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

Parameters:

a : array_like, shape (M, N)

Matrix to be factored.

mode : {‘reduced’, ‘complete’, ‘r’, ‘raw’, ‘full’, ‘economic’}, optional

If K = min(M, N), then

‘reduced’ : returns q, r wit