This is a pre-release version (latest).Go to latest (1.18.0)
{ } Raw JSON

bundles / scipy latest / scipy / linalg / _flapack / sgtsv

lapack_function

scipy.linalg._flapack:sgtsv

source: build-install/usr/lib/python3.14/site-packages/scipy/linalg/_flapack.cpython-314-x86_64-linux-gnu.so

Signature

def sgtsv(dl, d, du, b, overwrite_dl = 0, overwrite_d = 0, overwrite_du = 0, overwrite_b = 0)

Summary

Solve a @ x = b for a tridiagonal a by Gaussian elimination with partial pivoting (LAPACK sgtsv).

Parameters

dl : ndarray

Subdiagonal elements, length n - 1.

d : ndarray

Diagonal elements, length n.

du : ndarray

Superdiagonal elements, length n - 1.

b : ndarray

Right-hand side(s) of shape (n, nrhs).

overwrite_dl : int, optional

If nonzero, dl may be overwritten in place. Default is 0.

overwrite_d : int, optional

If nonzero, d may be overwritten in place. Default is 0.

overwrite_du : int, optional

If nonzero, du may be overwritten in place. Default is 0.

overwrite_b : int, optional

If nonzero, b may be overwritten in place. Default is 0.

Returns

du2 : ndarray

Second superdiagonal of U in the leading n - 2 entries, written over dl; the final entry is not part of the factorization.

d : ndarray

Diagonal of U.

du : ndarray

First superdiagonal of U.

x : ndarray

Solution of the system.

info : int

0 on success; if negative, the -info-th argument had an illegal value; if positive, u[info-1, info-1] is exactly zero and the factor is singular.

Aliases

  • scipy.linalg._flapack.sgtsv