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/linalg/tests/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

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

d�c���|�ddlZddlZddlmZddlmcmZddl	m
Z
mZ	ddlZn
#e$rdZYnwxYwej
�edud���ZdZejd��ejdej
�e���g���fZejejejejejejgZeje�	��d
���Zeje�	��d���Zejd���Zejd
���Zd�Z d�Z!d�Z"d�Z#d�Z$d�Z%d�Z&d�Z'd�Z(d�Z)d�Z*d�Z+d�Z,d�Z-d�Z.d�Z/d�Z0dS)�N)�assert_allclose�assert_equalzpydata/sparse not installed)�reasonz;pydata/sparse (0.8) does not implement necessary operations�COO�DOK)�marks)�paramsc�6�tt|j��S�N)�getattr�sparse�param��requests �N/usr/lib/python3/dist-packages/scipy/sparse/linalg/tests/test_pydata_sparse.py�
sparse_clsr"s���6�7�=�)�)�)�c��|jSr)rrs r�
sp_sparse_clsr's
���=�rc��tj�d��tj�dd��}||��||��fS�Ni��	)�np�random�seed�rand)rr�A_denses   r�same_matrixr,sJ���I�N�N�4�����i�n�n�Q��"�"�G��=��!�!�:�:�g�#6�#6�6�6rc���tj�d��tj�dd��}||jz}||��}tj�d��}|||fSr)rrrr�T)rr�A_sparse�bs    r�matricesr#3sf���I�N�N�4�����i�n�n�Q��"�"�G���	�!�G��z�'�"�"�H�
�	���q���A��H�a��rc��|\}}}tj||d���\}}|dksJ�t|tj��sJ�t||z|��dS)NgV瞯�<��atolr)�splin�gmres�
isinstancer�ndarrayr)r#rr!r"�x�infos      r�test_isolve_gmresr-=si��$��G�X�q��k�(�A�E�2�2�2�G�A�t��1�9�9�9�9��a���$�$�$�$�$��H�q�L�!�$�$�$�$�$rc��|\}}}tj||��}tj||��}t|d|dd���dS)Nrg?�̔���>r%)r'�lsmrr�r#rr!r"�res0�ress      r�	test_lsmrr3GsS��#��G�X�q��:�g�q�!�!�D�
�*�X�q�
!�
!�C��C��F�D��G�&�1�1�1�1�1�1rc���tjtjd��tjd��tjd�����d}t|jd��dS)N)�
�r5r6)�Ar"�x0r)r6)r'r/r�ones�zerosr�shape)r+s r�test_lsmr_output_shaper<OsO��
�
�R�W�W�%�%���"���"�'�!�*�*�E�E�E�a�H�A����$�����rc��|\}}}tj||��}tj||��}t|d|dd���dS)Nrg�h㈵��>r%)r'�lsqrrr0s      r�	test_lsqrr?TsS��#��G�X�q��:�g�q�!�!�D�
�*�X�q�
!�
!�C��C��F�D��G�$�/�/�/�/�/�/rc�x�|\}}}tj|dz��}|�|��}tj|d|���\}}tj|d|���\}}	t||��t|	|��||fD]�}
tj||d|���\}}tj||
d|���\}}	t||��t|	|��tj||d|���\}}tj||
d|���\}}	t||��t|	|����dS)N����k�v0)�MrDrE)r�diag�	__class__r'�eigsr�eigsh)r#rr!rE�M_dense�M_sparse�w_dense�v_dense�w�vrFs           r�	test_eigsrQ[sZ��$��G�X�r��g�b�!�e�n�n�G��!�!�'�*�*�H��z�'�Q�2�6�6�6��G�W��:�h�!��+�+�+�D�A�q��A�w�����A�w������
 �$�$�� �:�g��A�"�E�E�E�����z�(�a�1��4�4�4���1���7�#�#�#���7�#�#�#� �;�w�'�Q�2�F�F�F�����{�8�q�A�"�5�5�5���1���7�#�#�#���7�#�#�#�#�$�$rc���|\}}}tj|d|���\}}}tj|d|���\}}}	t||��t||��t|	|��dS)NrArC)r'�svdsr)
r#rr!rE�u0�s0�vt0�u�s�vts
          r�	test_svdsrZus|��$��G�X�r��*�W��b�1�1�1�K�B��C��z�(�a�B�/�/�/�H�A�q�"��A�r�����A�r�����B������rc���|\}}}|dd�df}tj||��\}}tj||��\}}t||��t||��dSr)r'�lobpcgr)	r#rr!r+�XrMrNrOrPs	         r�test_lobpcgr^�sp��#��G�X�q�	�!�!�!�D�&�	�A��|�G�Q�/�/��G�W��<��!�$�$�D�A�q��A�w�����A�w�����rc�"�|\}}}tj�t|��d��}t	jt
j|��|��}t	j||��}t|tj	��sJ�t||��t	jt
j|��|��}t	j||d���}t|tj	��sJ�t||��t	jt
j|��|��}t	j||��}t|tj	��sJ�t||��t	jt
j|��t
j|����}t	j||��}t|t|����sJ�t|���|�����dS)NrBT)�use_umfpack)
rrr�lenr'�spsolve�sp�
csc_matrixr)r*r�type�toarray)r#rr!r"�b2r8r+s       r�test_spsolverh�s���#��G�X�q�	�����A����	"�	"�B�	��r�}�W�-�-�q�	1�	1�B�
�
�h��"�"�A��a���$�$�$�$�$��A�r����	��r�}�W�-�-�q�	1�	1�B�
�
�h��t�4�4�4�A��a���$�$�$�$�$��A�r����	��r�}�W�-�-�r�	2�	2�B�
�
�h��#�#�A��a���$�$�$�$�$��A�r����	��r�}�W�-�-��}�W�-�-�
/�
/�B�
�
�h��)�)�A��a��h���(�(�(�(�(��A�I�I�K�K������.�.�.�.�.rc	�6�|\}}}t|��}t|��}tj|��}t	|j|��sJ�t	|j|��sJ�|tjtj
|��|jtj|��ff����}|tjtj
|��tj|��|j
ff����}|j|jz|jz|jz}	t|	���|�����|�|�����}
t|
tj|��d���dS)Ng�����|�=r%)rarer'�splur)�L�Urcrdrr9�perm_r�arange�perm_cr rrf�solve�eye)r#rr!r"�nr�lu�Pr�Pc�A2�zs           r�	test_splurx�sL��#��G�X�q��A���A��h���J�	��H�	�	�B��b�d�J�'�'�'�'�'��b�d�J�'�'�'�'�'�	��B�M�2�7�1�:�:��	�2�9�Q�<�<�/H�"I�J�J�	K�	K�B�	��B�M�2�7�1�:�:��	�!���b�i�/H�"I�J�J�	K�	K�B�	�����r�t�	�b�d�	"�B��B�J�J�L�L�(�"2�"2�"4�"4�5�5�5�
����!�!�#�#�$�$�A��A�r�v�a�y�y�u�-�-�-�-�-�-rc�d�|\}}}t|��}tj|��}t|j|��sJ�t|j|��sJ�|�|�����}t|tj
t|����d���dS)Ng����MbP?r%)rer'�spilur)rkrlrprfrrrqra)r#rr!r"rrsrws       r�
test_spilur{�s���#��G�X�q��h���J�	��X�	�	�B��b�d�J�'�'�'�'�'��b�d�J�'�'�'�'�'�
����!�!�#�#�$�$�A��A�r�v�c�!�f�f�~�~�D�1�1�1�1�1�1rc��|\}}}tj|��}tj||��}t	||z|��dSr)r
�trilr'�spsolve_triangularr)r#rr!r"r+s     r�test_spsolve_triangularr�sI��#��G�X�q��{�8�$�$�H�
� ��1�-�-�A��H�q�L�!�$�$�$�$�$rc��|\}}}tj|��}tj|��}t||��dSr)r'�
onenormestr)r#rr!r"�est0�ests      r�test_onenormestr��sD��#��G�X�q���G�$�$�D�
�
�8�
$�
$�C��C������rc���|\}}}tjtj|����}tj|��}t	|���|�����dSr)r'�invrcrdrrf�r#rr!r"r8r+s      r�test_invr��s\��#��G�X�q�	��2�=��)�)�	*�	*�B�
�	�(���A��A�I�I�K�K������.�.�.�.�.rc���|\}}}tjtj|����}tj|��}t	|���|�����dSr)r'�expmrcrdrrfr�s      r�	test_expmr��s\��#��G�X�q�	��B�M�'�*�*�	+�	+�B�
�
�8���A��A�I�I�K�K������.�.�.�.�.rc��|\}}}tj||��}tj||��}t||��dSr)r'�
expm_multiplyrr�s      r�test_expm_multiplyr��sH��#��G�X�q�	�	�W�a�	(�	(�B�
��H�a�(�(�A��A�r�����rc�D�|\}}||k���sJ�dSr)�all�r�	sp_sparse�	pd_sparses   r�test_eqr��s/��&��I�y���"�'�'�)�)�)�)�)�)�)rc�D�|\}}||k���rJ�dSr)�anyr�s   r�test_ner��s/��&��I�y��Y�&�+�+�-�-�-�-�-�-�-r)1�pytest�numpyr�scipy.sparser
rc�scipy.sparse.linalg�linalgr'�
numpy.testingrr�	Exception�mark�skipif�
pytestmark�msgr�xfail�
sparse_params�
bsr_matrix�
csr_matrix�
coo_matrixrd�
dia_matrix�
dok_matrix�scipy_sparse_classes�fixturerrrr#r-r3r<r?rQrZr^rhrxr{rr�r�r�r�r�r��rr�<module>r�s���
�
�
�
�����������#�#�#�#�#�#�#�#�#�7�7�7�7�7�7�7�7���M�M�M�M������
�F�F�F������[�
�
��$��'D� �F�F�
�D�����e�$�$����e�F�K�,=�,=�S�,=�,I�,I�+J�K�K�K�M�
��M��M��M��M��M��M�
�����}�%�%�%�*�*�&�%�*����+�,�,�,���-�,����7�7���7��� � ��� �%�%�%�2�2�2� � � �
0�0�0�$�$�$�4��� � � �/�/�/�4.�.�.�(
2�
2�
2�%�%�%����/�/�/�/�/�/����*�*�*�
.�.�.�.�.s�&�0�0

Youez - 2016 - github.com/yon3zu
LinuXploit