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 with dimensions (M, K), (K, N) (default) ?complete? : returns q, r with dimensions (M, M), (M, N) ?r? : returns r only with dimensions (K, N) ?