
    Ph>                     \    d Z ddl ddlmZ ddlmZ ddlmZ g dZddlmZ  ee	      Z
[y	)
a)  
Linear Solvers
==============

The default solver is SuperLU (included in the scipy distribution),
which can solve real or complex linear systems in both single and
double precisions.  It is automatically replaced by UMFPACK, if
available.  Note that UMFPACK works in double precision only, so
switch it off by::

    >>> from scipy.sparse.linalg import spsolve, use_solver
    >>> use_solver(useUmfpack=False)

to solve in the single precision. See also use_solver documentation.

Example session::

    >>> from scipy.sparse import csc_array, dia_array
    >>> from numpy import array
    >>>
    >>> print("Inverting a sparse linear system:")
    >>> print("The sparse matrix (constructed from diagonals):")
    >>> a = dia_array(([[1, 2, 3, 4, 5], [6, 5, 8, 9, 10]], [0, 1]), shape=(5, 5))
    >>> b = array([1, 2, 3, 4, 5])
    >>> print("Solve: single precision complex:")
    >>> use_solver( useUmfpack = False )
    >>> a = a.astype('F')
    >>> x = spsolve(a, b)
    >>> print(x)
    >>> print("Error: ", a@x-b)
    >>>
    >>> print("Solve: double precision complex:")
    >>> use_solver( useUmfpack = True )
    >>> a = a.astype('D')
    >>> x = spsolve(a, b)
    >>> print(x)
    >>> print("Error: ", a@x-b)
    >>>
    >>> print("Solve: double precision:")
    >>> a = a.astype('d')
    >>> x = spsolve(a, b)
    >>> print(x)
    >>> print("Error: ", a@x-b)
    >>>
    >>> print("Solve: single precision:")
    >>> use_solver( useUmfpack = False )
    >>> a = a.astype('f')
    >>> x = spsolve(a, b.astype('f'))
    >>> print(x)
    >>> print("Error: ", a@x-b)

   )*)SuperLU)_add_newdocs)linsolve)
MatrixRankWarningr   
factorizedspiluspluspsolveis_sptriangularspsolve_triangular
use_solverspbandwidth    )PytestTesterN)__doc__r   _superlur    r   __all__scipy._lib._testutilsr   __name__test     oC:\Users\daisl\Desktop\realtime-object-detection\venv\Lib\site-packages\scipy/sparse/linalg/_dsolve/__init__.py<module>r      s2   3r     /Hr   