
    S_fvg                        d dl mZ d dlZd dlmZ d dlmZmZmZm	Z	 d dl
mZmZ d dlmZ d dlZddlmZ d	Z	 d dlmZ e Zg dZ G d de      Zd Zd Zd ZddZdddd e       fdZ	 	 ddZ d Z!	 	 ddZ"y# e$ r d
ZY Fw xY w)    )warnN)asarray)issparseSparseEfficiencyWarning
csc_matrix
csr_matrix)is_pydata_spmatrixconvert_pydata_sparse_to_scipy)LinAlgError   )_superluFT)
use_solverspsolvespluspilu
factorizedMatrixRankWarningspsolve_triangularc                       e Zd Zy)r   N)__name__
__module____qualname__     Dlib/python3.12/site-packages/scipy/sparse/linalg/_dsolve/linsolve.pyr   r      s    r   r   c                  v    d| v r| d   t               d<   t        rd| v rt        j                  | d          yyy)as	  
    Select default sparse direct solver to be used.

    Parameters
    ----------
    useUmfpack : bool, optional
        Use UMFPACK [1]_, [2]_, [3]_, [4]_. over SuperLU. Has effect only
        if ``scikits.umfpack`` is installed. Default: True
    assumeSortedIndices : bool, optional
        Allow UMFPACK to skip the step of sorting indices for a CSR/CSC matrix.
        Has effect only if useUmfpack is True and ``scikits.umfpack`` is
        installed. Default: False

    Notes
    -----
    The default sparse solver is UMFPACK when available
    (``scikits.umfpack`` is installed). This can be changed by passing
    useUmfpack = False, which then causes the always present SuperLU
    based solver to be used.

    UMFPACK requires a CSR/CSC matrix to have sorted column/row indices. If
    sure that the matrix fulfills this, pass ``assumeSortedIndices=True``
    to gain some speed.

    References
    ----------
    .. [1] T. A. Davis, Algorithm 832:  UMFPACK - an unsymmetric-pattern
           multifrontal method with a column pre-ordering strategy, ACM
           Trans. on Mathematical Software, 30(2), 2004, pp. 196--199.
           https://dl.acm.org/doi/abs/10.1145/992200.992206

    .. [2] T. A. Davis, A column pre-ordering strategy for the
           unsymmetric-pattern multifrontal method, ACM Trans.
           on Mathematical Software, 30(2), 2004, pp. 165--195.
           https://dl.acm.org/doi/abs/10.1145/992200.992205

    .. [3] T. A. Davis and I. S. Duff, A combined unifrontal/multifrontal
           method for unsymmetric sparse matrices, ACM Trans. on
           Mathematical Software, 25(1), 1999, pp. 1--19.
           https://doi.org/10.1145/305658.287640

    .. [4] T. A. Davis and I. S. Duff, An unsymmetric-pattern multifrontal
           method for sparse LU factorization, SIAM J. Matrix Analysis and
           Computations, 18(1), 1997, pp. 140--158.
           https://doi.org/10.1137/S0895479894246905T.

    Examples
    --------
    >>> import numpy as np
    >>> from scipy.sparse.linalg import use_solver, spsolve
    >>> from scipy.sparse import csc_matrix
    >>> R = np.random.randn(5, 5)
    >>> A = csc_matrix(R)
    >>> b = np.random.randn(5)
    >>> use_solver(useUmfpack=False) # enforce superLU over UMFPACK
    >>> x = spsolve(A, b)
    >>> np.allclose(A.dot(x), b)
    True
    >>> use_solver(useUmfpack=True) # reset umfPack usage to default
    
useUmfpackassumeSortedIndices)r   N)globalsr   umfpack	configure)kwargss    r   r   r      sD    z v"("6	,+v5f5J.KL 6zr   c                    t         j                  t         j                  fdt         j                  t         j                  fdt         j                  t         j                  fdt         j                  t         j                  fdi}t        t         | j                  j                        }t        t         | j                  j                  j                        }	 |||f   }|d	   d
z   }t        j                  |       }t        j                  | j                  t         j                        |_        t        j                  | j                  t         j                        |_        ||fS # t        $ r}d| d| d}t        |      |d}~ww xY w)z8Get umfpack family string given the sparse matrix dtype.dizidlzlz]only float64 or complex128 matrices with int32 or int64 indices are supported! (got: matrix: z, indices: )Nr   ldtype)npfloat64int32
complex128int64getattrr+   nameindicesKeyError
ValueErrorcopyr   indptr)A	_familiesf_typei_typefamilyemsgA_news           r   _get_umf_familyr@   _   s,    
RXX	!4	RXX	!4	I R&F R--.F%FF+, AY_FIIaLE::ahhbhh7ELJJqyy9EM5=  %77=hk&QRTo1$%s   E& &	F	/FF	c                    t        j                  t         j                        j                  }| j                  d   |kD  rt        d      t        | j                   |kD  r-t        j                  | j                  |kD        rt        d      | j                  j                  t         j                  d      }| j                  j                  t         j                  d      }||fS )Nz#indptr values too large for SuperLUz$indices values too large for SuperLUFr6   )
r,   iinfointcmaxr7   r5   shapeanyr3   astype)r8   	max_valuer3   r7   s       r   _safe_downcast_indicesrK      s    !%%Ixx|i>??
AGG}y 66!))i'(CDDiirwwU3GXX__RWW5_1FF?r   c           
      (
   t        |      }|r|j                  nd}t        |       } t        |      }t        |       r| j                  dv st        |       } t        dt        d       t        |      }|st        |      }|j                  dk(  xs# |j                  dk(  xr |j                  d   dk(  }| j                          | j                         } t        j                  | j                  |j                        }| j                  |k7  r| j!                  |      } |j                  |k7  r|j!                  |      }| j                  \  }	}
|	|
k7  rt#        d|	|
f d      |	|j                  d	   k7  r)t#        d
| j                   d|j                  d	    d      |xr t$        }|r|r|r|j'                         }n|}t        || j                        j)                         }t*        rt-        d      | j                  j.                  dvrt#        d      t1        |       \  }} t3        j4                  |      }|j7                  t2        j8                  | |d      }|S |r|r|j'                         }d}|s| j                  dk(  rd}nd	}| j:                  j!                  t        j<                  d      }| j>                  j!                  t        j<                  d      }tA        |      }tC        jD                  |
| jF                  | jH                  |||||      \  }}|d	k7  r1t        dtJ        d       |jM                  t        jN                         |r|j)                         }|S tQ        |       }|j                  dk(  s(t        |      st        dt        d       t        |      }g }g }g }tS        |j                  d         D ]  }|dd|gf   j'                         j)                         } ||      }t        jT                  |      }|j                  d	   }|jW                  |       |jW                  t        jX                  ||tZ                     |jW                  t        j                  ||   | j                                t        j\                  |      }t        j\                  |      }t        j\                  |      }| j                  |||ff|j                  | j                        }|r|j_                  |      }|S )a  Solve the sparse linear system Ax=b, where b may be a vector or a matrix.

    Parameters
    ----------
    A : ndarray or sparse matrix
        The square matrix A will be converted into CSC or CSR form
    b : ndarray or sparse matrix
        The matrix or vector representing the right hand side of the equation.
        If a vector, b.shape must be (n,) or (n, 1).
    permc_spec : str, optional
        How to permute the columns of the matrix for sparsity preservation.
        (default: 'COLAMD')

        - ``NATURAL``: natural ordering.
        - ``MMD_ATA``: minimum degree ordering on the structure of A^T A.
        - ``MMD_AT_PLUS_A``: minimum degree ordering on the structure of A^T+A.
        - ``COLAMD``: approximate minimum degree column ordering [1]_, [2]_.

    use_umfpack : bool, optional
        if True (default) then use UMFPACK for the solution [3]_, [4]_, [5]_,
        [6]_ . This is only referenced if b is a vector and
        ``scikits.umfpack`` is installed.

    Returns
    -------
    x : ndarray or sparse matrix
        the solution of the sparse linear equation.
        If b is a vector, then x is a vector of size A.shape[1]
        If b is a matrix, then x is a matrix of size (A.shape[1], b.shape[1])

    Notes
    -----
    For solving the matrix expression AX = B, this solver assumes the resulting
    matrix X is sparse, as is often the case for very sparse inputs.  If the
    resulting X is dense, the construction of this sparse result will be
    relatively expensive.  In that case, consider converting A to a dense
    matrix and using scipy.linalg.solve or its variants.

    References
    ----------
    .. [1] T. A. Davis, J. R. Gilbert, S. Larimore, E. Ng, Algorithm 836:
           COLAMD, an approximate column minimum degree ordering algorithm,
           ACM Trans. on Mathematical Software, 30(3), 2004, pp. 377--380.
           :doi:`10.1145/1024074.1024080`

    .. [2] T. A. Davis, J. R. Gilbert, S. Larimore, E. Ng, A column approximate
           minimum degree ordering algorithm, ACM Trans. on Mathematical
           Software, 30(3), 2004, pp. 353--376. :doi:`10.1145/1024074.1024079`

    .. [3] T. A. Davis, Algorithm 832:  UMFPACK - an unsymmetric-pattern
           multifrontal method with a column pre-ordering strategy, ACM
           Trans. on Mathematical Software, 30(2), 2004, pp. 196--199.
           https://dl.acm.org/doi/abs/10.1145/992200.992206

    .. [4] T. A. Davis, A column pre-ordering strategy for the
           unsymmetric-pattern multifrontal method, ACM Trans.
           on Mathematical Software, 30(2), 2004, pp. 165--195.
           https://dl.acm.org/doi/abs/10.1145/992200.992205

    .. [5] T. A. Davis and I. S. Duff, A combined unifrontal/multifrontal
           method for unsymmetric sparse matrices, ACM Trans. on
           Mathematical Software, 25(1), 1999, pp. 1--19.
           https://doi.org/10.1145/305658.287640

    .. [6] T. A. Davis and I. S. Duff, An unsymmetric-pattern multifrontal
           method for sparse LU factorization, SIAM J. Matrix Analysis and
           Computations, 18(1), 1997, pp. 140--158.
           https://doi.org/10.1137/S0895479894246905T.


    Examples
    --------
    >>> import numpy as np
    >>> from scipy.sparse import csc_matrix
    >>> from scipy.sparse.linalg import spsolve
    >>> A = csc_matrix([[3, 2, 0], [1, -1, 0], [0, 5, 1]], dtype=float)
    >>> B = csc_matrix([[2, 0], [-1, 0], [2, 0]], dtype=float)
    >>> x = spsolve(A, B)
    >>> np.allclose(A.dot(x).toarray(), B.toarray())
    True
    N)csccsrz.spsolve requires A be CSC or CSR matrix format   
stacklevelr   z!matrix must be square (has shape r(   r   z!matrix - rhs dimension mismatch (z - r*   Scikits.umfpack not installed.dDZconvert matrix data to double, please, using .astype(), or set linsolve.useUmfpack = FalseTautoTransposeFrM   rC   )ColPerm)optionszMatrix is exactly singularzCspsolve is more efficient when sparse b is in the CSC matrix format)rG   r+   )0r	   	__class__r
   r   formatr   r   r   r   ndimrG   sum_duplicates	_asfptyper,   promote_typesr+   rI   r5   r   toarrayravelnoScikitRuntimeErrorcharr@   r    UmfpackContextlinsolve	UMFPACK_Ar3   rE   r7   dictr   gssvnnzdatar   fillnanr   rangeflatnonzeroappendfullintconcatenatefrom_scipy_sparse) r8   b
permc_specuse_umfpackis_pydata_sparsepydata_sparse_clsb_is_sparseb_is_vectorresult_dtypeMNb_vec
umf_familyumfxflagr3   r7   rX   info
Afactsolve	data_segsrow_segscol_segsjbjxjwsegment_lengthsparse_data
sparse_row
sparse_cols                                    r   r   r      si   d *!,'7T&q)A&q)AQKAHH6qM=$	4 1+KAJFFaKEQVVq[%DQWWQZ1_K 	A##AGGQWW5Lww,HH\"ww,HH\" 77DAq	Q<aVHAFGGAGGAJ<QWWISQRTUVWW,*K{IIKEEQWW-335?@@77<<t# C D D (*
A$$Z0LL**Au'+  -v Hq ;		AKxx5 ii&&rwwU&;GXX__RWW5_9F:.GmmAquuaffgv$%tW>GAtqy13DQRSrvvGGIJ HE $AJHH%);A)> 3,< qM IHH1771:& C
 q1#vY&&(..0^NN2&!"" EF  BqE!ABC ..3K1J1J[:z*BC!"  9A  %77:Hr   c           
      H   t        |       r.t        |       dd}| j                         j                         } nt        }t        |       r| j                  dk(  st	        |       } t        dt        d       | j                          | j                         } | j                  \  }}||k7  rt        d      t        |       \  }	}
t        ||||      }||j                  |       |d	   d
k(  rd|d<   t!        j"                  || j$                  | j&                  |	|
|d|      S )a  
    Compute the LU decomposition of a sparse, square matrix.

    Parameters
    ----------
    A : sparse matrix
        Sparse matrix to factorize. Most efficient when provided in CSC
        format. Other formats will be converted to CSC before factorization.
    permc_spec : str, optional
        How to permute the columns of the matrix for sparsity preservation.
        (default: 'COLAMD')

        - ``NATURAL``: natural ordering.
        - ``MMD_ATA``: minimum degree ordering on the structure of A^T A.
        - ``MMD_AT_PLUS_A``: minimum degree ordering on the structure of A^T+A.
        - ``COLAMD``: approximate minimum degree column ordering

    diag_pivot_thresh : float, optional
        Threshold used for a diagonal entry to be an acceptable pivot.
        See SuperLU user's guide for details [1]_
    relax : int, optional
        Expert option for customizing the degree of relaxing supernodes.
        See SuperLU user's guide for details [1]_
    panel_size : int, optional
        Expert option for customizing the panel size.
        See SuperLU user's guide for details [1]_
    options : dict, optional
        Dictionary containing additional expert options to SuperLU.
        See SuperLU user guide [1]_ (section 2.4 on the 'Options' argument)
        for more details. For example, you can specify
        ``options=dict(Equil=False, IterRefine='SINGLE'))``
        to turn equilibration off and perform a single iterative refinement.

    Returns
    -------
    invA : scipy.sparse.linalg.SuperLU
        Object, which has a ``solve`` method.

    See also
    --------
    spilu : incomplete LU decomposition

    Notes
    -----
    This function uses the SuperLU library.

    References
    ----------
    .. [1] SuperLU https://portal.nersc.gov/project/sparse/superlu/

    Examples
    --------
    >>> import numpy as np
    >>> from scipy.sparse import csc_matrix
    >>> from scipy.sparse.linalg import splu
    >>> A = csc_matrix([[1., 0., 0.], [5., 0., 2.], [0., -1., 0.]], dtype=float)
    >>> B = splu(A)
    >>> x = np.array([1., 2., 3.], dtype=float)
    >>> B.solve(x)
    array([ 1. , -3. , -1.5])
    >>> A.dot(B.solve(x))
    array([ 1.,  2.,  3.])
    >>> B.solve(A.dot(x))
    array([ 1.,  2.,  3.])
    clsc                 0    | j                  t        |       S Nrs   r   r   as     r   csc_construct_funcz splu.<locals>.csc_construct_func      ((Q88r   rM   &splu converted its input to CSC formatrO   rP   can only factor square matrices)DiagPivotThreshrW   	PanelSizeRelaxrW   NATURALTSymmetricModeFr   ilurX   r	   typeto_scipy_sparsetocscr   r   rZ   r   r   r\   r]   rG   r5   rK   rg   updater   gstrfri   rj   )r8   ru   diag_pivot_threshrelax
panel_sizerX   r   r|   r}   r3   r7   _optionss               r   r   r   S  s   H !'+Aw 	9%%''QKAHH-qM5$	4 	A77DAq	Q:;;,Q/OGV$5z(7H  	y($(!>>!QUUAFFGV-?#X7 7r   c	           
      N   t        |       r.t        |       dd}	| j                         j                         } nt        }	t        |       r| j                  dk(  st	        |       } t        dt        d       | j                          | j                         } | j                  \  }
}|
|k7  rt        d      t        |       \  }}t        |||||||      }||j                  |       |d	   d
k(  rd|d<   t!        j"                  || j$                  | j&                  |||	d|      S )a  
    Compute an incomplete LU decomposition for a sparse, square matrix.

    The resulting object is an approximation to the inverse of `A`.

    Parameters
    ----------
    A : (N, N) array_like
        Sparse matrix to factorize. Most efficient when provided in CSC format.
        Other formats will be converted to CSC before factorization.
    drop_tol : float, optional
        Drop tolerance (0 <= tol <= 1) for an incomplete LU decomposition.
        (default: 1e-4)
    fill_factor : float, optional
        Specifies the fill ratio upper bound (>= 1.0) for ILU. (default: 10)
    drop_rule : str, optional
        Comma-separated string of drop rules to use.
        Available rules: ``basic``, ``prows``, ``column``, ``area``,
        ``secondary``, ``dynamic``, ``interp``. (Default: ``basic,area``)

        See SuperLU documentation for details.

    Remaining other options
        Same as for `splu`

    Returns
    -------
    invA_approx : scipy.sparse.linalg.SuperLU
        Object, which has a ``solve`` method.

    See also
    --------
    splu : complete LU decomposition

    Notes
    -----
    To improve the better approximation to the inverse, you may need to
    increase `fill_factor` AND decrease `drop_tol`.

    This function uses the SuperLU library.

    Examples
    --------
    >>> import numpy as np
    >>> from scipy.sparse import csc_matrix
    >>> from scipy.sparse.linalg import spilu
    >>> A = csc_matrix([[1., 0., 0.], [5., 0., 2.], [0., -1., 0.]], dtype=float)
    >>> B = spilu(A)
    >>> x = np.array([1., 2., 3.], dtype=float)
    >>> B.solve(x)
    array([ 1. , -3. , -1.5])
    >>> A.dot(B.solve(x))
    array([ 1.,  2.,  3.])
    >>> B.solve(A.dot(x))
    array([ 1.,  2.,  3.])
    r   c                 0    | j                  t        |       S r   r   r   s     r   r   z!spilu.<locals>.csc_construct_func  r   r   rM   z'spilu converted its input to CSC formatrO   rP   r   )ILU_DropRuleILU_DropTolILU_FillFactorr   rW   r   r   rW   r   Tr   r   r   )r8   drop_tolfill_factor	drop_ruleru   r   r   r   rX   r   r|   r}   r3   r7   r   s                  r   r   r     s   v !'+Aw 	9%%''QKAHH-qM6$	4 	A77DAq	Q:;;,Q/OGV#.$5z(7H   	y($(!>>!QUUAFFGV-?"H6 6r   c                     t               r j                         j                          t        rt        rt        d      t               r j                  dk(  st                t        dt        d        j                           j                  j                  dvrt        d      t               \  } t!        j"                  |      j%                           fd}|S t'               j(                  S )	a  
    Return a function for solving a sparse linear system, with A pre-factorized.

    Parameters
    ----------
    A : (N, N) array_like
        Input. A in CSC format is most efficient. A CSR format matrix will
        be converted to CSC before factorization.

    Returns
    -------
    solve : callable
        To solve the linear system of equations given in `A`, the `solve`
        callable should be passed an ndarray of shape (N,).

    Examples
    --------
    >>> import numpy as np
    >>> from scipy.sparse.linalg import factorized
    >>> from scipy.sparse import csc_matrix
    >>> A = np.array([[ 3. ,  2. , -1. ],
    ...               [ 2. , -2. ,  4. ],
    ...               [-1. ,  0.5, -1. ]])
    >>> solve = factorized(csc_matrix(A)) # Makes LU decomposition.
    >>> rhs1 = np.array([1, -2, 0])
    >>> solve(rhs1) # Uses the LU factors.
    array([ 1., -2., -2.])

    rR   rM   r   rO   rP   rS   rT   c                     t        j                  dd      5  j                  t        j                  | d      }d d d        |S # 1 sw Y   S xY w)Nignore)divideinvalidTrU   )r,   errstatesolver    rf   )rt   resultr8   r   s     r   r   zfactorized.<locals>.solveR  sN    Hh? P7#4#4a$OP M	P Ms   $AA)r	   r   r   r   ra   rb   r   rZ   r   r   r   r]   r+   rc   r5   r@   r    rd   numericr   r   )r8   r   r   r   s   `  @r   r   r     s    < !%%'?@@E 11A9(Q8 KKM77<<t# C D D (*
A$$Z0 	A	 Aw}}r   c                 (   t        |       r| j                         j                         } t        |       r| j                  dk(  st        dt        d       t        |       } n|s| j                         } | j                  d   | j                  d   k7  rt        d| j                   d      | j                          t        j                  |      }|j                  d	vrt        d
|j                   d      | j                  d   |j                  d   k7  r&t        d| j                   d|j                   d      t        j                  | j                   |t        j"                        }|rAt        j$                  |j&                  |d      r|}n/t        d|j&                   d| d      |j)                  |d      }|rt+        t-        |            }nt+        t-        |      dz
  dd      }|D ]  }	| j.                  |	   }
| j.                  |	dz      }|r|dz
  }t1        |
|dz
        }n|
}t1        |
dz   |      }|s&||
k  s| j2                  |   |	k  rt5        d|	 d      |s:| j2                  |   |	kD  r(t5        dj	                  |	| j2                  |               | j2                  |   }| j                   |   }||	xx   t        j6                  ||   j8                  |      z  cc<   |r||	xx   | j                   |   z  cc<    |S )a  
    Solve the equation ``A x = b`` for `x`, assuming A is a triangular matrix.

    Parameters
    ----------
    A : (M, M) sparse matrix
        A sparse square triangular matrix. Should be in CSR format.
    b : (M,) or (M, N) array_like
        Right-hand side matrix in ``A x = b``
    lower : bool, optional
        Whether `A` is a lower or upper triangular matrix.
        Default is lower triangular matrix.
    overwrite_A : bool, optional
        Allow changing `A`. The indices of `A` are going to be sorted and zero
        entries are going to be removed.
        Enabling gives a performance gain. Default is False.
    overwrite_b : bool, optional
        Allow overwriting data in `b`.
        Enabling gives a performance gain. Default is False.
        If `overwrite_b` is True, it should be ensured that
        `b` has an appropriate dtype to be able to store the result.
    unit_diagonal : bool, optional
        If True, diagonal elements of `a` are assumed to be 1 and will not be
        referenced.

        .. versionadded:: 1.4.0

    Returns
    -------
    x : (M,) or (M, N) ndarray
        Solution to the system ``A x = b``. Shape of return matches shape
        of `b`.

    Raises
    ------
    LinAlgError
        If `A` is singular or not triangular.
    ValueError
        If shape of `A` or shape of `b` do not match the requirements.

    Notes
    -----
    .. versionadded:: 0.19.0

    Examples
    --------
    >>> import numpy as np
    >>> from scipy.sparse import csr_matrix
    >>> from scipy.sparse.linalg import spsolve_triangular
    >>> A = csr_matrix([[3, 0, 0], [1, -1, 0], [2, 0, 1]], dtype=float)
    >>> B = np.array([[2, 0], [-1, 0], [2, 0]], dtype=float)
    >>> x = spsolve_triangular(A, B)
    >>> np.allclose(A.dot(x), B)
    True
    rN   z8CSR matrix format is required. Converting to CSR matrix.rO   rP   r   r   z+A must be a square matrix but its shape is .)r   rO   z)b must have 1 or 2 dims but its shape is zlThe size of the dimensions of A must be equal to the size of the first dimension of b but the shape of A is z and the shape of b is 	same_kind)castingzCannot overwrite b (dtype z) with result of type TrC   rB   zA is singular: diagonal z	 is zero.z*A is not triangular: A[{}, {}] is nonzero.)r	   r   tocsrr   rZ   r   r   r   r6   rG   r5   r\   r,   
asanyarrayr[   result_typerj   r-   can_castr+   rI   rm   lenr7   slicer3   r   dotT)r8   rt   loweroverwrite_Aoverwrite_bunit_diagonalx_dtyper   row_indicesiindptr_startindptr_stopA_diagonal_index_row_iA_off_diagonal_indices_row_iA_column_indices_in_row_iA_values_in_row_is                   r   r   r   ^  s	   t !%%' QKAHH-G$	4qMFFHwwqzQWWQZ9!''!DF 	F 
aAvvV7yBD 	DwwqzQWWQZJwwi.qwwiq:
 	
 nnQVVQ

3G;;qww=A,QWWI 6")1& 
 HHW4H( CFmCFQJB/  3 xx{hhq1uo%01_"+0{Q+O(%1"+01A;+O( +"=%&YY/E%F%J*1#Y79 9+A!BQ!F6!QYY'=>?A A
 %&II.J$K!FF#?@	!q23557HII aDAFF122D=3@ Hr   )NT)NNNNNNNN)TFFF)#warningsr   numpyr,   r   scipy.sparser   r   r   r   scipy.sparse._sputilsr	   r
   scipy.linalgr   r6    r   ra   scikits.umfpackr    ImportErrorr   __all__UserWarningr   r   r@   rK   r   rg   r   r   r   r   r   r   r   <module>r      s      K K T $  % \
6	 	@MD D@F tdfe7P JNGK^6B?D IN%*L]  Hs   A; ;BB