jax.scipy.linalg.lu_factor

Contents

jax.scipy.linalg.lu_factor#

jax.scipy.linalg.lu_factor(a, overwrite_a=False, check_finite=True)[source]#

Compute pivoted LU decomposition of a matrix.

LAX-backend implementation of scipy.linalg._decomp_lu.lu_factor().

Does not support the Scipy argument check_finite=True, because compiled JAX code cannot perform checks of array values at runtime.

Does not support the Scipy argument overwrite_*=True.

Original docstring below.

The decomposition is:

A = P L U

where P is a permutation matrix, L lower triangular with unit diagonal elements, and U upper triangular.

Parameters:
  • a ((M, N) array_like) – Matrix to decompose

  • overwrite_a (bool) –

  • check_finite (bool) –

Return type:

tuple[Array, Array]

Returns:

  • lu ((M, N) ndarray) – Matrix containing U in its upper triangle, and L in its lower triangle. The unit diagonal elements of L are not stored.

  • piv ((K,) ndarray) – Pivot indices representing the permutation matrix P: row i of matrix was interchanged with row piv[i]. Of shape (K,), with K = min(M, N).