{ } Raw JSON

bundles / scipy 1.18.0 / scipy / linalg / _batched_linalg / _lu

built-in

scipy.linalg._batched_linalg:_lu

Signature

built-in_linalg_lu(a, permute_l, overwrite_a, /)

Summary

LU factorization with partial pivoting.

Extended Summary

Computes P, L, U such that A = P @ L @ U where P is a permutation, L is unit lower triangular, and U is upper triangular.

Parameters

a : (..., M, N) ndarray

Input array of type float32, float64, complex64, or complex128.

permute_l : bool

If True, L is returned already permuted (P @ L) and P is empty.

overwrite_a : bool

If True and the input is 2D, F-contiguous, and writable, the input buffer is reused as the larger factor (destroyed on exit).

Returns

p : (..., M) ndarray of int

Permutation indices. Empty array when permute_l is True.

l : (..., M, K) ndarray

Lower triangular factor with unit diagonal, K = min(M, N).

u : (..., K, N) ndarray

Upper triangular factor.

Aliases

  • scipy.linalg._batched_linalg._lu