Guest User

Untitled

a guest
Jan 21st, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. x
  2. Out[25]:
  3. <11250x11250 sparse matrix of type '<class 'numpy.float64'>'
  4. with 44547 stored elements in Compressed Sparse Column format>
  5.  
  6. g = np.zeros((x.shape[0]))
  7. g[idx] = 0.1
  8.  
  9. from scipy.sparse.linalg import spsolve
  10. F = spsolve(x, g)
  11.  
  12. scipy.sparse.linalg.dsolve.linsolve.MatrixRankWarning: Matrix is exactly singular
  13.  
  14. spsolve(x* 1.00000001, g)
  15. Out[53]: array([-0., -0., -0., ..., -0., -0., -0.])
  16. spsolve(x/ 1.00000001, g)
  17. Out[54]: array([-0., -0., -0., ..., -0., -0., -0.])
  18.  
  19. A.T g = z
Add Comment
Please, Sign In to add comment