- cupy.linalg.qr(a, mode='reduced')[source]#
Decompose a given two-dimensional matrix into
Q * R, where
Qis an orthonormal and
Ris an upper-triangular matrix.
a (cupy.ndarray) – The input matrix.
mode (str) – The mode of decomposition. Currently ‘reduced’, ‘complete’, ‘r’, and ‘raw’ modes are supported. The default mode is ‘reduced’, in which matrix
A = (..., M, N)is decomposed into
(..., M, K),
(..., K, N), where
K = min(M, N).
Although the type of returned object depends on the mode, it returns a tuple of
(Q, R)by default. For details, please see the document of
- Return type
cupy.ndarray, or tuple of ndarray
This function calls one or more cuSOLVER routine(s) which may yield invalid results if input conditions are not met. To detect these invalid results, you can set the linalg configuration to a value that is not ignore in