- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP

- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who

The linear function named scipy.linalg.solve_banded is used to solve the banded matrix equation. The form of this function is as follows −

scipy.linalg.solve_banded(l_and_u, ab, b, overwrite_ab=False, overwrite_b=False, debug=None, check_finite=True)

This linear function will solve the equation ax = b for x where a is a banded matrix.

The banded matrix **a** is stored in **ab** by using the matrix diagonal ordered form as follows −

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

The example of ab is given as follows −

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

Here the shape of a is (6, 6) and u =1, l = 2.

Below are given the parameters of the function scipy.linalg.solve_banded() −

**(l, u)**− (integer, integer)These represent the number of non-zero lower and upper diagonals.

**ab**− b(l + u + 1, M) array_likeAs discussed, this parameter represents the banded matrix.

**b**− (M,) or (M, K)array_likeThis parameter represents the right-hand side.

**Overwrite_ab**− bool, optionalThis parameter is used to discard the data in banded matrix ab. It may enhance the performance of matrices.

**Overwrite_b**− bool, optionalThis parameter is used to discard the data in b. It may enhance the performance of matrices.

**check_finite**− bool, optionalThis parameter is used to check whether the input matrices contain only finite numbers or not. We may get some performance gain after disabling it. It may result in problems if the inputs do not contain infinites.

**x**− (M,) or (M, K) ndarrayIt returns the solution of the banded matrix equation ax = b. The shape of the output will depend on the shape of b.

- Related Questions & Answers
- Which linear function of SciPy is used to solve Hermitian positive-definite banded matrix equation?
- Which linear function of SciPy is used to solve the circulant matrix equation?
- Which linear function of SciPy is used to solve triangular matrix equations?
- Which linear function of SciPy is used to solve Toeplitz matrix using Levinson Recursion?
- Which linear function of SciPy is used to solve Toeplitz matrix multiplication using\nFFT?
- How to solve Hermitian positive-banded matrix equation using Python SciPy?
- How to solve banded matrix equations using Python SciPy?
- How to solve a circulant matrix equation using Python SciPy?
- How to solve Toeplitz matrix equation using Python SciPy?
- How can we use the SciPy library to solve a Linear equation?
- Solve a linear matrix equation or system of linear scalar equations in Python
- Secant method to solve non-linear equation
- Which SciPy package is used to implement Clustering?
- C++ Program to Solve any Linear Equation in One Variable
- How to solve triangular matrix equations using Python SciPy?

Advertisements