cupyx.scipy.linalg.lu#
- cupyx.scipy.linalg.lu(a, permute_l=False, overwrite_a=False, check_finite=True)[source]#
LU decomposition.
Decomposes a given two-dimensional matrix into
P @ L @ U
, whereP
is a permutation matrix,L
is a lower triangular or trapezoidal matrix with unit diagonal, andU
is a upper triangular or trapezoidal matrix.- Parameters:
a (cupy.ndarray) – The input matrix with dimension
(M, N)
.permute_l (bool) – If
True
, perform the multiplicationP @ L
.overwrite_a (bool) – Allow overwriting data in
a
(may enhance performance)check_finite (bool) – Whether to check that the input matrices contain only finite numbers. Disabling may give a performance gain, but may result in problems (crashes, non-termination) if the inputs do contain infinities or NaNs.
- Returns:
(P, L, U)
ifpermute_l == False
, otherwise(PL, U)
.P
is acupy.ndarray
storing permutation matrix with dimension(M, M)
.L
is acupy.ndarray
storing lower triangular or trapezoidal matrix with unit diagonal with dimension(M, K)
whereK = min(M, N)
.U
is acupy.ndarray
storing upper triangular or trapezoidal matrix with dimension(K, N)
.PL
is acupy.ndarray
storing permutedL
matrix with dimension(M, K)
.- Return type:
See also