, permute_l=False, overwrite_a=False, check_finite=True)[source]#

LU decomposition.

Decomposes a given two-dimensional matrix into P @ L @ U, where P is a permutation matrix, L is a lower triangular or trapezoidal matrix with unit diagonal, and U is a upper triangular or trapezoidal matrix.

  • a (cupy.ndarray) – The input matrix with dimension (M, N).

  • permute_l (bool) – If True, perform the multiplication P @ 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.


(P, L, U) if permute_l == False, otherwise (PL, U). P is a cupy.ndarray storing permutation matrix with dimension (M, M). L is a cupy.ndarray storing lower triangular or trapezoidal matrix with unit diagonal with dimension (M, K) where K = min(M, N). U is a cupy.ndarray storing upper triangular or trapezoidal matrix with dimension (K, N). PL is a cupy.ndarray storing permuted L matrix with dimension (M, K).

Return type: