Hello,

I was trying to find the LU factorization for a sparse matrix(size 159990 by 159990). Following are the three lines in python i have used for the LU decomposition

"

from scipy.sparse import csc_matrix, linalg as sla

interior_stiff=CSC_matrix(159990 by 159990)

LU= sla.splu(interior_stiff,options=dict(SymmetricMode=True))   "

Properties of this matrix include,

1. Symmetric

2. The diagonal elements are the largest among the corresponding matrix column.

3. Non singular matrix

While running the code i was getting the following error in spyder GUI,

  File "", line 1, in

    runfile('C:/temp/new_LU/Run_1_using_LU.py', wdir='C:/temp/new_LU')

  File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 866, in runfile

    execfile(filename, namespace)

  File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 102, in execfile

    exec(compile(f.read(), filename, 'exec'), namespace)

  File "C:/temp/new_LU/Run_1_using_LU.py", line 574, in

    LU= sla.splu(interior_stiff,options=dict(SymmetricMode=True))

  File "C:\ProgramData\Anaconda3\lib\site-packages\scipy\sparse\linalg\dsolve\linsolve.py", line 261, in splu

    ilu=False, options=_options)

RuntimeError: Factor is exactly singular

Can anyone suggest a possible solution for this?

Any help will be appreciated.

Thank You,

Paul Thomas

Similar questions and discussions