diff options
author | Alex Leontiev <alozz1991@gmail.com> | 2020-11-20 21:10:36 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-20 21:10:36 +0900 |
commit | 86c0f9ad16aec5b359e6d1b4f1e71159008f06f8 (patch) | |
tree | a44c48e863e4693752421375bf4426cfc53d7d6b | |
parent | b88b2c0c19851810d4ee07f03a7734b6e19dbdaa (diff) | |
download | numpy-86c0f9ad16aec5b359e6d1b4f1e71159008f06f8.tar.gz |
Update linalg.py
-rw-r--r-- | numpy/linalg/linalg.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/numpy/linalg/linalg.py b/numpy/linalg/linalg.py index 5970a00ba..5b55a6658 100644 --- a/numpy/linalg/linalg.py +++ b/numpy/linalg/linalg.py @@ -361,13 +361,13 @@ def solve(a, b): Examples -------- - Solve the system of equations ``3 * x0 + x1 = 9`` and ``x0 + 2 * x1 = 8``: + Solve the system of equations ``x0 + 2 * x1 = 1`` and ``3 * x0 + 5 * x1 = 2``: - >>> a = np.array([[3,1], [1,2]]) - >>> b = np.array([9,8]) + >>> a = np.array([[1,2], [3,5]]) + >>> b = np.array([1,2]) >>> x = np.linalg.solve(a, b) >>> x - array([2., 3.]) + array([-1., 1.]) Check that the solution is correct: |