
    Ug	                           G d  d          Z dS )c                      e 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S )spmatrixzThis 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     S/var/www/surfInsights/venv3-11/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)linalgr/   )r   powerr/   s      r	   __pow__zspmatrix.__pow__2   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_shape9   s7     <<E<22;;DKHH )r   c                     | j         S )zGet the shape of the matrix)_shaper   s    r	   	get_shapezspmatrix.get_shape@   
    {r   zShape of the matrix)fgetfsetdocc                 *    |                                  S )z7Upcast matrix to a floating point format (if necessary))	_asfptyper>   s    r	   asfptypezspmatrix.asfptypeG   s    ~~r   c                 *    |                                  S )z3Maximum number of elements to display when printed.)_getmaxprintr>   s    r	   getmaxprintzspmatrix.getmaxprintK   s      """r   c                     | j         S )zMatrix storage format)r7   r>   s    r	   	getformatzspmatrix.getformatO   r@   r   Nc                 .    |                      |          S )zNumber 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   rM   s     r	   getnnzzspmatrix.getnnzS   s     |||&&&r   c                 N    |                                                                  S )zReturn 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.getcolg        ||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.getrowm   rX   r   r&   )__name__
__module____qualname____doc__propertyr
   r   r   r   r   r    r$   r*   r-   r2   r;   r?   r9   rF   rI   rK   rO   rS   rW   r\    r   r	   r   r      s        
   X   X   X   X   X   X   X
, , ,- - -) ) )* * *   H)).0 0 0E     # # #  	' 	' 	' 	', , ,      r   r   N)r   rb   r   r	   <module>rc      sA   p p p p p p p p p pr   