# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

# +
import numpy as np
from scipy import linalg

A = np.array([[1, 1], [2, 3]])
print("A array")
print(A)

b = np.array([[1], [2]])
print("b array")
print(b)

solution = np.linalg.solve(A, b) 
print("solution ")
print(solution)

# validate results
print("validation of solution (should be a 0 matrix)")
print(A.dot(solution) - b)
# -



StarcoderdataJupyterScriptsDedupFiltered