cupy.linalg.qr¶
-
cupy.linalg.
qr
(a, mode='reduced')[source]¶ QR decomposition.
Decompose a given two-dimensional matrix into
Q * R
, whereQ
is an orthonormal andR
is an upper-triangular matrix.Parameters: - 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 intoQ
,R
with dimensions(M, K)
,(K, N)
, whereK = min(M, N)
.
Returns: 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 ofnumpy.linalg.qr()
.Return type: cupy.ndarray, or tuple of ndarray
See also