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)