cupyx.scipy.linalg.lu_factor#
- cupyx.scipy.linalg.lu_factor(a, overwrite_a=False, check_finite=True)[source]#
LU decomposition.
Decompose a given two-dimensional square matrix into
P * L * U, wherePis a permutation matrix,Llower-triangular with unit diagonal elements, andUupper-triangular matrix.- Parameters:
a (cupy.ndarray) – The input matrix with dimension
(M, N)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:
(lu, piv)whereluis acupy.ndarraystoringUin its upper triangle, andLwithout unit diagonal elements in its lower triangle, andpivis acupy.ndarraystoring pivot indices representing permutation matrixP. For0 <= i < min(M,N), rowiof the matrix was interchanged with rowpiv[i]- Return type:
See also