§
    _ùMhK  ã                   ó    —  G d „ d¦  «        Z dS )c                   ó(  ‡ — e Zd ZdZdZed„ ¦   «         Zed„ ¦   «         Zed„ ¦   «         Zed„ ¦   «         Z	ed„ ¦   «         Z
ed„ ¦   «         Zed	„ ¦   «         Zd
„ Zd„ Zd„ Zd„ Zd„ Z eeed¬¦  «        Zd„ Zd„ Zd„ Zdd„Zd„ Zd„ Zd„ Zdˆ fd„	Zˆ xZS )Úspmatrixz‘This class provides a base class for all sparse matrix classes.

    It cannot be instantiated.  Most of the work is provided by subclasses.
    )é   c                 ó   — ddl m} |S )Né   )Ú
bsr_matrix)Ú_bsrr   )Úselfr   s     úT/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/scipy/sparse/_matrix.pyÚ_bsr_containerzspmatrix._bsr_container   ó   € à$Ð$Ð$Ð$Ð$Ð$ØÐó    c                 ó   — ddl m} |S )Nr   )Ú
coo_matrix)Ú_coor   )r	   r   s     r
   Ú_coo_containerzspmatrix._coo_container   r   r   c                 ó   — ddl m} |S )Nr   )Ú
csc_matrix)Ú_cscr   )r	   r   s     r
   Ú_csc_containerzspmatrix._csc_container   r   r   c                 ó   — ddl m} |S )Nr   )Ú
csr_matrix)Ú_csrr   )r	   r   s     r
   Ú_csr_containerzspmatrix._csr_container   r   r   c                 ó   — ddl m} |S )Nr   )Ú
dia_matrix)Ú_diar   )r	   r   s     r
   Ú_dia_containerzspmatrix._dia_container   r   r   c                 ó   — ddl m} |S )Nr   )Ú
dok_matrix)Ú_dokr   )r	   r   s     r
   Ú_dok_containerzspmatrix._dok_container!   r   r   c                 ó   — ddl m} |S )Nr   )Ú
lil_matrix)Ú_lilr#   )r	   r#   s     r
   Ú_lil_containerzspmatrix._lil_container&   r   r   c                 ó,   — |                       |¦  «        S ©N)Ú_matmul_dispatch©r	   Úothers     r
   Ú__mul__zspmatrix.__mul__,   s   € Ø×$Ò$ UÑ+Ô+Ð+r   c                 ó,   — |                       |¦  «        S r'   )Ú_rmatmul_dispatchr)   s     r
   Ú__rmul__zspmatrix.__rmul__/   s   € Ø×%Ò% eÑ,Ô,Ð,r   c                 ó&   — ddl m}  || |¦  «        S )Nr   )Úmatrix_power)Úlinalgr0   )r	   Úpowerr0   s      r
   Ú__pow__zspmatrix.__pow__3   s&   € Ø(Ð(Ð(Ð(Ð(Ð(àˆ|˜D %Ñ(Ô(Ð(r   c                 ó|   — |                       |d¬¦  «                             | j        ¦  «        }|j        | _        dS )z$Set the shape of the matrix in-placeF)ÚcopyN)ÚreshapeÚasformatÚformatÚ__dict__)r	   ÚshapeÚnew_selfs      r
   Ú	set_shapezspmatrix.set_shape:   s7   € ð —<’< ¨E<Ñ2Ô2×;Ò;¸D¼KÑHÔHˆØ Ô)ˆŒˆˆr   c                 ó   — | j         S )zGet the shape of the matrix)Ú_shape©r	   s    r
   Ú	get_shapezspmatrix.get_shapeA   ó
   € àŒ{Ðr   zShape of the matrix)ÚfgetÚfsetÚdocc                 ó*   — |                       ¦   «         S )z7Upcast matrix to a floating point format (if necessary))Ú	_asfptyper?   s    r
   Úasfptypezspmatrix.asfptypeH   s   € à~Š~ÑÔÐr   c                 ó*   — |                       ¦   «         S )z3Maximum number of elements to display when printed.)Ú_getmaxprintr?   s    r
   Úgetmaxprintzspmatrix.getmaxprintL   s   € à× Ò Ñ"Ô"Ð"r   c                 ó   — | j         S )zMatrix storage format)r8   r?   s    r
   Ú	getformatzspmatrix.getformatP   rA   r   Nc                 ó.   — |                       |¬¦  «        S )zóNumber of stored values, including explicit zeros.

        Parameters
        ----------
        axis : None, 0, or 1
            Select between the number of values across the whole array, in
            each column, or in each row.
        )Úaxis)Ú_getnnz)r	   rN   s     r
   Úgetnnzzspmatrix.getnnzT   s   € ð |Š| ˆ|Ñ&Ô&Ð&r   c                 óN   — |                       ¦   «                              ¦   «         S )z¤Return the Hermitian transpose of this matrix.

        See Also
        --------
        numpy.matrix.getH : NumPy's implementation of `getH` for matrices
        )Ú	conjugateÚ	transposer?   s    r
   ÚgetHzspmatrix.getH_   s    € ð ~Š~ÑÔ×)Ò)Ñ+Ô+Ð+r   c                 ó,   — |                       |¦  «        S )zgReturns a copy of column j of the matrix, as an (m x 1) sparse
        matrix (column vector).
        )Ú_getcol)r	   Újs     r
   Úgetcolzspmatrix.getcolh   ó   € ð |Š|˜A‰ŒÐr   c                 ó,   — |                       |¦  «        S )z`Returns a copy of row i of the matrix, as a (1 x n) sparse
        matrix (row vector).
        )Ú_getrow)r	   Úis     r
   Úgetrowzspmatrix.getrown   rY   r   c                 óH   •— t          ¦   «                              ||¦  «        S )aÅ  
        Return a dense representation of this sparse matrix.

        Parameters
        ----------
        order : {'C', 'F'}, optional
            Whether to store multi-dimensional data in C (row-major)
            or Fortran (column-major) order in memory. The default
            is 'None', which provides no ordering guarantees.
            Cannot be specified in conjunction with the `out`
            argument.

        out : ndarray, 2-D, optional
            If specified, uses this array (or `numpy.matrix`) as the
            output buffer instead of allocating a new array to
            return. The provided array must have the same shape and
            dtype as the sparse matrix on which you are calling the
            method.

        Returns
        -------
        arr : numpy.matrix, 2-D
            A NumPy matrix object with the same shape and containing
            the same data represented by the sparse matrix, with the
            requested memory order. If `out` was passed and was an
            array (rather than a `numpy.matrix`), it will be filled
            with the appropriate values and returned wrapped in a
            `numpy.matrix` object that shares the same memory.
        )ÚsuperÚtodense)r	   ÚorderÚoutÚ	__class__s      €r
   r`   zspmatrix.todenset   s   ø€ õ< ‰wŒwŠ˜u cÑ*Ô*Ð*r   r'   )NN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú	_allow_ndÚpropertyr   r   r   r   r   r!   r%   r+   r.   r3   r<   r@   r:   rG   rJ   rL   rP   rT   rX   r]   r`   Ú__classcell__)rc   s   @r
   r   r      sá  ø€ € € € € ðð ð €Iàðð ñ „Xðð ðð ñ „Xðð ðð ñ „Xðð ðð ñ „Xðð ðð ñ „Xðð ðð ñ „Xðð ðð ñ „Xðð
,ð ,ð ,ð-ð -ð -ð)ð )ð )ð*ð *ð *ðð ð ð ˆH˜)¨)Ø.ð0ñ 0ô 0€Eð ð  ð  ð#ð #ð #ðð ð ð	'ð 	'ð 	'ð 	'ð,ð ,ð ,ðð ð ðð ð ð+ð +ð +ð +ð +ð +ð +ð +ð +ð +r   r   N)r   © r   r
   ú<module>rl      sA   ððQ+ð Q+ð Q+ð Q+ð Q+ñ Q+ô Q+ð Q+ð Q+ð Q+r   