def factorized(A):
 if useUmfpack:
  if noScikit:
   raise RuntimeError('Scikits.umfpack not installed.')
  if (not isspmatrix_csc(A)):
   A = csc_matrix(A)
   warn('splu requires CSC matrix format', SparseEfficiencyWarning)
  A.sort_indices()
  A = A.asfptype()
  if (A.dtype.char not in 'dD'):
   raise ValueError('convert matrix data to double, please, using .astype(), or set linsolve.useUmfpack = False')
  umf = umfpack.UmfpackContext(_get_umf_family(A))
  umf.numeric(A)
  def solve(b):
   return umf.solve(umfpack.UMFPACK_A, A, b, autoTranspose=True)
  return solve
 else:
  return splu(A).solve

def factorized ( A ) : if useUmfpack : if noScikit : raise RuntimeError ( 'Scikits.umfpack not installed.' ) if ( not isspmatrix_csc ( A ) ) : A = csc_matrix ( A ) warn ( 'splu requires CSC matrix format' , SparseEfficiencyWarning ) A . sort_indices ( ) A = A . asfptype ( ) if ( A . dtype . char not in 'dD' ) : raise ValueError ( 'convert matrix data to double, please, using .astype(), or set linsolve.useUmfpack = False' ) umf = umfpack . UmfpackContext ( _get_umf_family ( A ) ) umf . numeric ( A ) def solve ( b ) : return umf . solve ( umfpack . UMFPACK_A , A , b , autoTranspose = True ) return solve else : return splu ( A ) . solve
return a function for solving a sparse linear system .