NULAPACK
NUmerical Linear Algebra PACKage
Loading...
Searching...
No Matches
Functions
python.thomas Namespace Reference

Functions

 thomas (np.ndarray a, np.ndarray b)
 

Function Documentation

◆ thomas()

python.thomas.thomas ( np.ndarray  a,
np.ndarray  b 
)
Solve a tridiagonal linear system A * X = B using the Thomas algorithm.

Parameters
----------
a : ndarray
    Coefficient matrix (n x n) stored as a full matrix.
b : ndarray
    Right-hand side vector (n,)

Returns
-------
x : ndarray
    Solution vector
info : int
    0 if success, <0 if zero diagonal detected

Definition at line 33 of file thomas.py.