class_docstr: SpLuInv:
     helper class to repeatedly solve M*x=b
     using a sparse LU-decopposition of M
class_docstr_tok: ["SpLuInv",":","helper","class","to","repeatedly","solve","M","*","x=b","using","a","sparse","LU-decopposition","of","M"]
code: def __init__(self, M):
      self.M_lu = splu(M)
      self.shape = M.shape
      self.dtype = M.dtype
      self.isreal = not np.issubdtype(self.dtype, np.complexfloating)
  
imports: from scipy.sparse.linalg.eigen.arpack import _arpack
  import numpy
  from scipy.sparse.linalg.interface import aslinearoperator, LinearOperator
  from scipy.sparse import identity, isspmatrix, isspmatrix_csr
  from scipy.linalg import lu_factor, lu_solve
  from scipy.sparse.sputils import isdense
  from scipy.sparse.linalg import gmres, splu
  import scipy
  import functools
  import operator
  from distutils.version import LooseVersion
label_desc: Use image node_id 1 to create a new SpLuInv object from inherited base classes: LinearOperator with example: obj = SpLuInv(M)