jax.lax.linalg.triangular_solve#
- jax.lax.linalg.triangular_solve(a, b, *, left_side=False, lower=False, transpose_a=False, conjugate_a=False, unit_diagonal=False)[source]#
Triangular solve.
Solves either the matrix equation
\[\mathit{op}(A) . X = B\]if
left_side
isTrue
or\[X . \mathit{op}(A) = B\]if
left_side
isFalse
.A
must be a lower or upper triangular square matrix, and where \(\mathit{op}(A)\) may either transpose \(A\) iftranspose_a
isTrue
and/or take its complex conjugate ifconjugate_a
isTrue
.- Parameters:
a (
Union
[Array
,ndarray
,bool_
,number
,bool
,int
,float
,complex
]) – A batch of matrices with shape[..., m, m]
.b (
Union
[Array
,ndarray
,bool_
,number
,bool
,int
,float
,complex
]) – A batch of matrices with shape[..., m, n]
ifleft_side
isTrue
or shape[..., n, m]
otherwise.left_side (
bool
) – describes which of the two matrix equations to solve; see above.lower (
bool
) – describes which triangle ofa
should be used. The other triangle is ignored.transpose_a (
bool
) – ifTrue
, the value ofa
is transposed.conjugate_a (
bool
) – ifTrue
, the complex conjugate ofa
is used in the solve. Has no effect ifa
is real.unit_diagonal (
bool
) – ifTrue
, the diagonal ofa
is assumed to be unit (all 1s) and not accessed.
- Return type:
- Returns:
A batch of matrices the same shape and dtype as
b
.