scipy.linalg.solve_banded

scipy.linalg.solve_banded((l, u), ab, b, overwrite_ab=False, overwrite_b=False, debug=False)[source]

Solve the equation a x = b for x, assuming a is banded matrix.

The matrix a is stored in ab using the matrix diagonal ordered form:

ab[u + i - j, j] == a[i,j]

Example of ab (shape of a is (6,6), u=1, l=2):

*    a01  a12  a23  a34  a45
a00  a11  a22  a33  a44  a55
a10  a21  a32  a43  a54   *
a20  a31  a42  a53   *    *
Parameters :

(l, u) : (integer, integer)

Number of non-zero lower and upper diagonals

ab : array, shape (l+u+1, M)

Banded matrix

b : array, shape (M,) or (M, K)

Right-hand side

overwrite_ab : boolean

Discard data in ab (may enhance performance)

overwrite_b : boolean

Discard data in b (may enhance performance)

Returns :

x : array, shape (M,) or (M, K)

The solution to the system a x = b

Previous topic

scipy.linalg.solve

Next topic

scipy.linalg.solveh_banded