class_docstr: SpLuInv:
     helper class to repeatedly solve M*x=b
     using a sparse LU-decomposition of M
class_docstr_tok: ["SpLuInv",":","helper","class","to","repeatedly","solve","M","*","x=b","using","a","sparse","LU-decomposition","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: import numpy
  import warnings
  from scipy.sparse.linalg._interface import aslinearoperator, LinearOperator
  from scipy.sparse import eye, issparse
  from scipy.linalg import eig, eigh, lu_factor, lu_solve
  from scipy.sparse._sputils import isdense, is_pydata_spmatrix
  from scipy.sparse.linalg import gmres, splu
  from scipy._lib._util import _aligned_zeros
  from scipy._lib._threadsafety import ReentrancyLock
  from .None import _arpack
label_desc: Use image node_id 1 to create a new SpLuInv object from inherited base classes: LinearOperator with example: obj = SpLuInv(M)