Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import numpy as np
- A = np.array([[5.0, 1, -2, 1],[1.0,-1, 1, -1],[1.0, 1, 1, 1],[1.0, -2, -1, 1]])
- b = np.array([2, 7.0, 9, -4])
- x_0 = np.array([1,3])
- A_1 = np.linalg.inv(A)
- print np.dot(A_1,b)
Advertisement
Add Comment
Please, Sign In to add comment