Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x
- Out[25]:
- <11250x11250 sparse matrix of type '<class 'numpy.float64'>'
- with 44547 stored elements in Compressed Sparse Column format>
- g = np.zeros((x.shape[0]))
- g[idx] = 0.1
- from scipy.sparse.linalg import spsolve
- F = spsolve(x, g)
- scipy.sparse.linalg.dsolve.linsolve.MatrixRankWarning: Matrix is exactly singular
- spsolve(x* 1.00000001, g)
- Out[53]: array([-0., -0., -0., ..., -0., -0., -0.])
- spsolve(x/ 1.00000001, g)
- Out[54]: array([-0., -0., -0., ..., -0., -0., -0.])
- A.T g = z
Add Comment
Please, Sign In to add comment