Advertisement
backlog

Untitled

Feb 28th, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.35 KB | None | 0 0
  1. from pandas import *
  2. import scipy
  3. #import linalg package of the SciPy module for the LU decomp
  4. import scipy.linalg as linalg
  5. #import NumPy
  6. import numpy as np
  7.  
  8. t=[[-33,11,0,24],[11,-38,14,-29],[0,14,-45,-29]]
  9. A=t
  10. print A
  11. #now we want to see how A has been factorized, P is the so called Permutation matrix
  12. P, L, U = scipy.linalg.lu(A)
  13.  
  14.  
  15. print U
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement