In this recipe, we will see how to solve system of equations and its applications.
System of equations and how to solve it
Getting ready
Get the library and the numpy.linalg.solve reference.
How to do it...
We have the following functions and parameters:
Parameters |
a : (..., M, M) array_like Coefficient matrix. b : {(..., M,), (..., M, K)}, array_like Ordinate or dependent variable values. |
Returns |
x : {(..., M,), (..., M, K)} ndarray Solution to the system a x = b. The returned shape is identical to b. |
Raises |
LinAlgError If a is singular or not square... |