Ë
    ÏÍ:j¼  ã                   ó   —  G d „ d«      Z y)c                   ó  ‡ — e Zd ZU dZdZeedf   ed<   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ed„ «       Zˆ xZ S )Úspmatrixaž  This class provides a base class for all sparse matrix classes.

    .. warning::

       SciPy sparse is shifting from a sparse matrix interface to a sparse
       array interface. In the next few releases we expect to deprecate the
       sparse matrix interface. For documentation of the matrix
       interface, see the :ref:`spmatrix interface docs <spmatrix_api>`.
       For guidance on converting existing code to sparse arrays, see
       :ref:`Migration from spmatrix to sparray <migration_to_sparray>`.

    This class also serves as the namespace for SciPy sparse matrix types.
    It cannot be instantiated.  Most of the work is provided by subclasses.
    )é   .Ú	_allow_ndc                 ó   — ddl m} |S )Né   )Ú
bsr_matrix)Ú_bsrr   )Úselfr   s     úi/home/mcse/projects/srt_converter/srt-converter-venv/lib/python3.12/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_container0   r   r   c                 ó$   — | j                  |«      S ©N)Ú_matmul_dispatch©r
   Úothers     r   Ú__mul__zspmatrix.__mul__6   s   € Ø×$Ñ$ UÓ+Ð+r   c                 ó$   — | j                  |«      S r(   )Ú_rmatmul_dispatchr*   s     r   Ú__rmul__zspmatrix.__rmul__9   s   € Ø×%Ñ% eÓ,Ð,r   c                 ó    — ddl m}  || |«      S )Nr   )Úmatrix_power)Úlinalgr1   )r
   Úpowerr1   s      r   Ú__pow__zspmatrix.__pow__=   s   € Ý(á˜D %Ó(Ð(r   c                 ó~   — | j                  |d¬«      j                  | j                  «      }|j                  | _        y)z$Set the shape of the matrix in-placeF)ÚcopyN)ÚreshapeÚasformatÚformatÚ__dict__)r
   ÚshapeÚnew_selfs      r   Ú	set_shapezspmatrix.set_shapeD   s2   € ð —<‘< ¨E�<Ó2×;Ñ;¸D¿K¹KÓHˆØ ×)Ñ)ˆ�r   c                 ó   — | j                   S )zGet the shape of the matrix)Ú_shape©r
   s    r   Ú	get_shapezspmatrix.get_shapeK   ó   € à�{‰{Ðr   zShape of the matrix)ÚfgetÚfsetÚdocc                 ó"   — | j                  «       S )z7Upcast matrix to a floating point format (if necessary))Ú	_asfptyper@   s    r   Úasfptypezspmatrix.asfptypeR   s   € à�~‰~ÓÐr   c                 ó"   — | j                  «       S )z3Maximum number of elements to display when printed.)Ú_getmaxprintr@   s    r   Úgetmaxprintzspmatrix.getmaxprintV   s   € à× Ñ Ó"Ð"r   c                 ó   — | j                   S )zMatrix storage format)r9   r@   s    r   Ú	getformatzspmatrix.getformatZ   rB   r   c                 ó&   — | j                  |¬«      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
   rO   s     r   Úgetnnzzspmatrix.getnnz^   s   € ð �|‰| ˆ|Ó&Ð&r   c                 ó>   — | j                  «       j                  «       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.getHi   s   € ð �~‰~Ó×)Ñ)Ó+Ð+r   c                 ó$   — | j                  |«      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.getcolr   ó   € ð �|‰|˜A‹Ðr   c                 ó$   — | j                  |«      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.getrowx   rZ   r   c                 ó$   •— 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   ra   zspmatrix.todense~   s   ø€ ô< ‰w‰˜u cÓ*Ð*r   c                ó    — ddl m}  || |«      S )a½  
        Return a parametrized wrapper around the `~scipy.sparse.spmatrix` type.

        .. versionadded:: 1.16.0

        Returns
        -------
        alias : types.GenericAlias
            A parametrized `~scipy.sparse.spmatrix` type.

        Examples
        --------
        >>> import numpy as np
        >>> from scipy.sparse import coo_matrix

        >>> coo_matrix[np.int8]
        scipy.sparse._coo.coo_matrix[numpy.int8]
        é    )ÚGenericAlias)Útypesrg   )ÚclsÚargrg   s      r   Ú__class_getitem__zspmatrix.__class_getitem__ž   s   € õ( 	'Ù˜C Ó%Ð%r   r(   )NN)!Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   ÚtupleÚintÚ__annotations__Úpropertyr   r   r   r   r   r"   r&   r,   r/   r4   r=   rA   r;   rH   rK   rM   rQ   rU   rY   r^   ra   Úclassmethodrk   Ú__classcell__)rd   s   @r   r   r      s  ø… ñð "&€Iˆu�S˜#�X‰Ó%àñó ðð ñó ðð ñó ðð ñó ðð ñó ðð ñó ðð ñó ðò
,ò-ò)ò*òñ ˜)¨)Ø.ô0€Eò ò#òó	'ò,òòõ+ð@ ñ&ó ô&r   r   N)r   © r   r   ú<module>rw      s   ð÷r&ò r&r   