Ë
    âQ(hH  ã                   ó<   — d dl Zd dlZddgZ ed¬«      Zdd„Zd„ Zy)	é    NÚsave_npzÚload_npzF)Úallow_picklec                 ó¼  — i }|j                   dv r(|j                  |j                  |j                  ¬«       n~|j                   dk(  r|j                  |j                  ¬«       nR|j                   dk(  r(|j                  |j
                  |j                  ¬«       nd|j                   › d�}t        |«      ‚|j                  |j                   j                  d	«      |j                  |j                  ¬
«       t        |t        j                  j                  «      r|j                  d¬«       |rt        j                   | fi |¤Ž yt        j"                  | fi |¤Ž y)aj   Save a sparse matrix or array to a file using ``.npz`` format.

    Parameters
    ----------
    file : str or file-like object
        Either the file name (string) or an open file (file-like object)
        where the data will be saved. If file is a string, the ``.npz``
        extension will be appended to the file name if it is not already
        there.
    matrix: spmatrix or sparray
        The sparse matrix or array to save.
        Supported formats: ``csc``, ``csr``, ``bsr``, ``dia`` or ``coo``.
    compressed : bool, optional
        Allow compressing the file. Default: True

    See Also
    --------
    scipy.sparse.load_npz: Load a sparse matrix from a file using ``.npz`` format.
    numpy.savez: Save several arrays into a ``.npz`` archive.
    numpy.savez_compressed : Save several arrays into a compressed ``.npz`` archive.

    Examples
    --------
    Store sparse matrix to disk, and load it again:

    >>> import numpy as np
    >>> import scipy as sp
    >>> sparse_matrix = sp.sparse.csc_matrix([[0, 0, 3], [4, 0, 0]])
    >>> sparse_matrix
    <Compressed Sparse Column sparse matrix of dtype 'int64'
        with 2 stored elements and shape (2, 3)>
    >>> sparse_matrix.toarray()
    array([[0, 0, 3],
           [4, 0, 0]], dtype=int64)

    >>> sp.sparse.save_npz('/tmp/sparse_matrix.npz', sparse_matrix)
    >>> sparse_matrix = sp.sparse.load_npz('/tmp/sparse_matrix.npz')

    >>> sparse_matrix
    <Compressed Sparse Column sparse matrix of dtype 'int64'
        with 2 stored elements and shape (2, 3)>
    >>> sparse_matrix.toarray()
    array([[0, 0, 3],
           [4, 0, 0]], dtype=int64)
    ©ÚcscÚcsrÚbsr)ÚindicesÚindptrÚdia)ÚoffsetsÚcoo)ÚrowÚcolz4Save is not implemented for sparse matrix of format ú.Úascii)ÚformatÚshapeÚdataT)Ú	_is_arrayN)r   Úupdater   r   r   r   r   ÚNotImplementedErrorÚencoder   r   Ú
isinstanceÚspÚsparseÚsparrayÚnpÚsavez_compressedÚsavez)ÚfileÚmatrixÚ
compressedÚarrays_dictÚmsgs        úU/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/scipy/sparse/_matrix_io.pyr   r      s  € ð\ €KØ‡}�}Ð-Ñ-Ø×Ñ 6§>¡>¸&¿-¹-ÐÕHØ	�‰˜%Ò	Ø×Ñ 6§>¡>ÐÕ2Ø	�‰˜%Ò	Ø×Ñ˜vŸz™z¨v¯z©zÐÕ:àDÀVÇ]Á]ÀOÐSTÐUˆÜ! #Ó&Ð&Ø×ÑØ�}‰}×#Ñ# GÓ,Ø�l‰lØ�[‰[ð ô ô
 �&œ"Ÿ)™)×+Ñ+Ô,Ø×Ñ TÐÔ*ÙÜ
×Ñ˜DÑ0 KÓ0ä
�‰�Ñ%˜Ó%ó    c                 ó¨  — t        j                  | fi t        ¤Ž5 }|j                  d«      }|€t	        d| › d�«      ‚|j                  «       }t        |t        «      s|j                  d«      }|j                  d«      r|dz   }n|dz   }	 t        t        j                  |› «      }|dv r" ||d   |d   |d   f|d   ¬«      cddd«       S |dk(  r ||d   |d   f|d   ¬«      cddd«       S |dk(  r# ||d   |d   |d   ff|d   ¬«      cddd«       S t        d|› d�«      ‚# t        $ r}t	        d	|› d
�«      |‚d}~ww xY w# 1 sw Y   yxY w)aä   Load a sparse array/matrix from a file using ``.npz`` format.

    Parameters
    ----------
    file : str or file-like object
        Either the file name (string) or an open file (file-like object)
        where the data will be loaded.

    Returns
    -------
    result : csc_array, csr_array, bsr_array, dia_array or coo_array
        A sparse array/matrix containing the loaded data.

    Raises
    ------
    OSError
        If the input file does not exist or cannot be read.

    See Also
    --------
    scipy.sparse.save_npz: Save a sparse array/matrix to a file using ``.npz`` format.
    numpy.load: Load several arrays from a ``.npz`` archive.

    Examples
    --------
    Store sparse array/matrix to disk, and load it again:

    >>> import numpy as np
    >>> import scipy as sp
    >>> sparse_array = sp.sparse.csc_array([[0, 0, 3], [4, 0, 0]])
    >>> sparse_array
    <Compressed Sparse Column sparse array of dtype 'int64'
        with 2 stored elements and shape (2, 3)>
    >>> sparse_array.toarray()
    array([[0, 0, 3],
           [4, 0, 0]], dtype=int64)

    >>> sp.sparse.save_npz('/tmp/sparse_array.npz', sparse_array)
    >>> sparse_array = sp.sparse.load_npz('/tmp/sparse_array.npz')

    >>> sparse_array
    <Compressed Sparse Column sparse array of dtype 'int64'
        with 2 stored elements and shape (2, 3)>
    >>> sparse_array.toarray()
    array([[0, 0, 3],
           [4, 0, 0]], dtype=int64)

    In this example we force the result to be csr_array from csr_matrix
    >>> sparse_matrix = sp.sparse.csc_matrix([[0, 0, 3], [4, 0, 0]])
    >>> sp.sparse.save_npz('/tmp/sparse_matrix.npz', sparse_matrix)
    >>> tmp = sp.sparse.load_npz('/tmp/sparse_matrix.npz')
    >>> sparse_array = sp.sparse.csr_array(tmp)
    r   Nz	The file z+ does not contain a sparse array or matrix.r   r   Ú_arrayÚ_matrixzUnknown format "ú"r   r   r   r   r   )r   r   r   r   r   r   z4Load is not implemented for sparse matrix of format r   )r   ÚloadÚPICKLE_KWARGSÚgetÚ
ValueErrorÚitemr   ÚstrÚdecodeÚgetattrr   r   ÚAttributeErrorr   )r"   ÚloadedÚsparse_formatÚsparse_typeÚclsÚes         r'   r   r   P   s½  € ôl 
�‰�Ñ	'œÑ	'ð !S¨6ØŸ
™
 8Ó,ˆØÐ Ü˜y¨¨ð /9ð :ó ;ð ;à%×*Ñ*Ó,ˆä˜-¬Ô-ð *×0Ñ0°Ó9ˆMà�:‰:�kÔ"Ø'¨(Ñ2‰Kà'¨)Ñ3ˆKð	GÜœ"Ÿ)™)¨ }Ó6ˆCð Ð1Ñ1Ù˜˜v™¨¨yÑ(9¸6À(Ñ;KÐLØ# G™_ô.÷/!Sñ !Sð2 ˜eÒ#Ù˜˜v™¨¨yÑ(9Ð:Ø# G™_ô.÷5!Sñ !Sð8 ˜eÒ#Ù˜˜v™¨°©¸¸u¹Ð(FÐGØ# G™_ô.÷;!Sñ !Sô@ &ð )AØANÀÈqð'Ró Sð Søô ò 	GÜÐ/°¨}¸AÐ>Ó?ÀQÐFûð	Gú÷'!Sð !SúsB   ›A0EÂD'Â'EÃEÃ0EÄEÄ'	EÄ0E Å EÅEÅE)T)	Únumpyr   Úscipyr   Ú__all__Údictr.   r   r   © r(   r'   ú<module>r@      s/   ðÛ Û à�zÐ
"€ñ  %Ô(€óB&óJWSr(   