import numpy as npa=np.mat('1 -2 1;0 2 -8;-4 5 9')b=np.array([0,8,-9])x=np.linalg.solve(a,b)print(x)
Standard input is empty
[ 29. 16. 3.]
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!