403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.217.25
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 :  /usr/lib/python3/dist-packages/scipy/special/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3/dist-packages/scipy/special/__pycache__/_testutils.cpython-311.pyc
�

d�c�.���ddlZddlZddlZddlmZddlZddlmZddl	Z	ddl
mZgd�Z
Gd�d��Zd�Zd�Z				dd�ZGd�d
��ZdS)�N)�_pep440)�assert_)�with_special_errors�assert_func_equal�FuncDatac��eZdZd�ZdS)�
MissingModulec��||_dS�N)�name)�selfrs  �:/usr/lib/python3/dist-packages/scipy/special/_testutils.py�__init__zMissingModule.__init__s
����	�	�	�N)�__name__�
__module__�__qualname__r�rrr	r	s#����������rr	c�p�t|��tkr8tj�d�|j�����Stj�tj	|j
��tj|��kd�|j|�����S)Nz{} is not installed��reasonz{} version >= {} required)
�typer	�pytest�mark�skip�formatr�skipifr�parse�__version__�Versionr)�module�min_vers  r�
check_versionr#s����F�|�|�}�$�$��{���'<�'C�'C�F�K�'P�'P��Q�Q�Q��;���g�m�F�,>�?�?�'�/�RY�BZ�BZ�Z�%@�%G�%G���Y`�%a�%a��c�c�crc�F��tj����fd���}|S)zc
    Enable special function errors (such as underflow, overflow,
    loss of precision, etc.)
    c�r��tjd���5�|i|��}ddd��n#1swxYwY|S)N�raise��all)�sc�errstate)�a�kw�res�funcs   �r�wrapperz$with_special_errors.<locals>.wrapper(s����
�[�W�
%�
%�
%�	!�	!��$��.�R�.�.�C�	!�	!�	!�	!�	!�	!�	!�	!�	!�	!�	!����	!�	!�	!�	!��
s�	,�0�0)�	functools�wraps)r.r/s` rrr#s:���
�_�T�����������NrTFc���t|d��rt|��}tj|��}|jdkr|dd�df}|jd}t|d��r|}
d}|}n>tj||f}
tt||
jd����}d}t||
tt|����|||||||	||
|��
�
}|�	��dS)N�next�r)
�result_columns�result_func�rtol�atol�param_filter�knownfailure�nan_ok�
vectorized�ignore_inf_sign�distinguish_nan_and_inf)
�hasattr�list�np�asarray�ndim�shape�c_�ranger�check)r.�results�pointsr7r8r9r:r<�dtyper;r=r>�nparams�datar5r6�fdatas                 rrr5s���v�v�����f����
�Z��
�
�F�
�{�a�������$�����l�1�o�G��w�
�#�#�	���������u�V�W�_�%���e�G�T�Z��]�;�;�<�<�����T�4��e�G�n�n�!5�!5�$2���T��".�v�*�%4�-D�
F�
F�
F�E�
�K�K�M�M�M�M�Mrc�6�eZdZdZ				d	d�Zd�Zd
d�Zd�ZdS)ra�
    Data set for checking a special function.

    Parameters
    ----------
    func : function
        Function to test
    data : numpy array
        columnar data to use for testing
    param_columns : int or tuple of ints
        Columns indices in which the parameters to `func` lie.
        Can be imaginary integers to indicate that the parameter
        should be cast to complex.
    result_columns : int or tuple of ints, optional
        Column indices for expected results from `func`.
    result_func : callable, optional
        Function to call to obtain results.
    rtol : float, optional
        Required relative tolerance. Default is 5*eps.
    atol : float, optional
        Required absolute tolerance. Default is 5*tiny.
    param_filter : function, or tuple of functions/Nones, optional
        Filter functions to exclude some parameter ranges.
        If omitted, no filtering is done.
    knownfailure : str, optional
        Known failure error message to raise when the test is run.
        If omitted, no exception is raised.
    nan_ok : bool, optional
        If nan is always an accepted result.
    vectorized : bool, optional
        Whether all functions passed in are vectorized.
    ignore_inf_sign : bool, optional
        Whether to ignore signs of infinities.
        (Doesn't matter for complex-valued functions.)
    distinguish_nan_and_inf : bool, optional
        If True, treat numbers which contain nans or infs as
        equal. Sets ignore_inf_sign to be True.

    NFTc���||_||_|
|_t|d��s|f}t	|��|_|�9t|d��s|f}t	|��|_|�td���n|�d|_ntd���||_||_	||_
t|d��s|f}||_|	|_||_
||_|
|_||_|js	d|_dSdS)N�__len__z5Only result_func or result_columns should be providedz7Either result_func or result_columns should be providedT)r.rL�datanamer?�tuple�
param_columnsr5�
ValueErrorr6r7r8r9r:r;r<r=r>)r
r.rLrSr5r6r7r8r9r:rQr;r<r=r>s               rrzFuncData.__init__s-����	���	� ��
��}�i�0�0�	-�*�,�M�"�=�1�1����%��>�9�5�5�
3�"0�!2��"'��"7�"7�D���&� �!X�Y�Y�Y�'�
�
$�"&�D����V�W�W�W�&�����	���	��|�Y�/�/�	+�(�?�L�(���(������$���.���'>��$��+�	(�#'�D� � � �	(�	(rc���tj|tj��stjt��}tj|��}|j|j}}|�
d|jz}|�
d|j	z}||fS)N�)
rA�
issubdtype�inexactrJ�float�finfor7r8�eps�tiny)r
rJ�infor7r8s     r�get_toleranceszFuncData.get_tolerances�si���}�U�B�J�/�/�	$��H�U�O�O�E��x������Y��	�d���<��T�X�:�D��<��T�Y�;�D��T�z�rc�z
���)�*�tjdt��}�jrt	j�j������j�|��j}n��|�����	|��\}}�j
rztj�j
dftj��}t�j�j
��D],\�)}|r%|t#|�dd��)f����z}�-�|�g�*t%�j��D]�\}	�)tj�)��rLt)�)j���)�*��dd��)f�t.�����e|rL|	t1|��kr9�*��dd��)f�||	�������*��dd��)f����d�*�fd�	}
|
�j��}�j�!t7�fd��jD����}nHd}
�jr-t1|��dkrtj|d��}
|
�j|
���}t?t1|��t1|��k��t%t||����D�]�\}\}}tj |jtj!��s�j"rQtj#|��}tj#|��}tj#|��}tj#|��}nPtj$|��}tj$|��}tj%|��}tj%|��}tj|��}tj|��}tj&d	�
��5tj'|��}d|tj(|��<tj'||z
��}d|tj(|��<|tj'|��z}d|tj(|��<ddd��n#1swxYwY||||zzk}||k}||k}||k}||z|z|z}|j)}�jr&||z}||z}|||z�*��z}�j+sW�jsPtj#|��} tj#|��}!| |z||!zz}"||"z}||"�*��z}tj,|���rydg}#|#�d||�-��z��|#�d
||�-��z��|#�dtj*|��||fz��tj.|��dD]��)t)�)���)�)fd�}$d�/ta|$�*����}%d�/ta|$|����}&d�/ta|$|����}'|$|��}(|#�|%�d|&�d|'�d|(�d�����t?dd�/|#������dS)z,Check the special function against the data.�
errisinstancerNrc
�����jr|��}n�g}tt�d����D]x�|�(|�r |�tj���,|�|t
��fd�tt�����D��������yt	j|��}t|t��s|f}|S)Nrc�,��g|]}�|���Srr)�.0�i�j�paramss  ��r�
<listcomp>z?FuncData.check.<locals>.eval_func_at_params.<locals>.<listcomp>�s!���+U�+U�+U�Q�F�1�I�a�L�+U�+U�+Ur)	r<rF�len�appendrA�nanrRrB�
isinstance)r.�	skip_mask�gotrerfr
s   @��r�eval_func_at_paramsz+FuncData.check.<locals>.eval_func_at_params�s�������	
&��d�F�m������s�6�!�9�~�~�.�.�Y�Y�A� �,��1��,��
�
�2�6�*�*�*� ��J�J�t�t�U�+U�+U�+U�+U�+U�%��F���BT�BT�+U�+U�+U�%V�%V�W�X�X�X�X��j��o�o���c�5�)�)�
��f���Jrc�(��g|]}�dd�|f��Srr)rc�icolrLs  �rrgz"FuncData.check.<locals>.<listcomp>�s%���I�I�I�T�D����4��L�I�I�Irr4)rl�ignorer'�zMax |adiff|: %gzMax |rdiff|: %gzCBad results (%d out of %d) for the following points (in output %d):c�B��dtj|�d���zS)Nz%30s�)�	precision)rA�array2string)�xres �r�<lambda>z FuncData.check.<locals>.<lambda>*s���F�R�_�Q�q�T�R�-P�-P�-P�$P�rz  z => z != z	  (rdiff �)F�
r)1�operator�methodcaller�AssertionErrorr:r�xfailrLrJ�astyper^r9rA�onesrD�bool_�ziprSr@�	enumerate�iscomplexobj�int�imagri�complexrhr.r5rRr;�isnanr6rrW�complexfloatingr=�isinf�isposinf�isneginfr*�absolute�isfinite�size�sumr>�any�max�nonzero�join�map)+r
rLrJ�dtypes�__tracebackhide__r7r8�
param_mask�filter�idxrnrm�wantedrl�
output_numrw�y�pinf_x�pinf_y�minf_x�minf_y�nan_x�nan_y�abs_y�diff�rdiff�tol_mask�	pinf_mask�	minf_mask�nan_mask�bad_j�point_count�inf_x�inf_y�both_nonfinite�msg�fmtr+�b�c�drerfs+``                                       @@rrGzFuncData.check�s�������$�1��^�
�
����	3��L�� 1�2�2�2�2��<��9�D��=��J�E�E��;�;�u�%�%�D��(�(��/�/�
��d���	$���$�*�Q�-�!1�2�8�<�<�J� ��!3�T�5F�G�G�
:�
:�	��6��:��$�v�v�d�1�1�1�Q�3�i�'8�'8�"9�"9�9�J���
�#�D����� 2�3�3�	)�	)�F�C����q�!�!�
)����K�K���
�
�d�1�1�1�Q�3�i�.�.�w�7�7�8�8�8�8��
)�C�#�f�+�+�-�-��
�
�d�1�1�1�a�4�j�/�/��s��<�<�=�=�=�=��
�
�d�1�1�1�Q�3�i�(�(�(�(�
	�
	�
	�
	�
	�
	�
	� "�!�$�)�,�,����*��I�I�I�I�T�5H�I�I�I�J�J�F�F��I��{�
-�s�3�x�x�1�}�}��H�S��V�,�,�	�(�(��)9�Y�O�O�O�F�	��C���C��K�K�'�(�(�(�"+�C��V�,<�,<�"=�"=�<	/�<	/��J���A��}�Q�W�b�&8�9�9�	
(�T�=Q�	
(���!������!������!������!�������Q������Q������Q������Q�����H�Q�K�K�E��H�Q�K�K�E����*�*�*�
/�
/���A����-.��r�{�5�)�)�)�*��{�1�q�5�)�)��+,��b�k�$�'�'�'�(��r�{�1�~�~�-��-.��r�{�5�)�)�)�*�
/�
/�
/�
/�
/�
/�
/�
/�
/�
/�
/����
/�
/�
/�
/���t�E�z� 1�1�H��6�)�I��6�)�I����H���*�Y�6��A�B�E��*�K��{�
5��%�����%�������
�2�2�4�4�4���/�
4���
4�������������"'�%�-�E�E�M�!B���.��(���~�1�1�3�3�3���v�e�}�}�
/��d���
�
�,�t�E�{���/@�/@�@�A�A�A��
�
�,�u�U�|�/?�/?�/A�/A�A�B�B�B��
�
�`� �f�U�m�m�[�*�F�G�H�H�H���E�*�*�1�-�L�L�A��A���A�P�P�P�P�C��	�	�#�c�6�"2�"2�3�3�A��	�	�#�c�3�-�-�0�0�A��	�	�#�c�6�"2�"2�3�3�A���E�
�
�A��J�J�q�q�q�!�!�!�Q�Q�Q����J�K�K�K�K���t�y�y��~�~�.�.�.��y<	/�<	/s�
BQ$�$Q(	�+Q(	c�(�tjtttj|j������rd}nd}|jr7d|jj�|�dtj
�|j���d�Sd|jj�|�d�S)z%Pretty-printing, esp. for Nose outputz
 (complex)rrz
<Data for z: �>)rAr�r@r�r�rSrQr.r�os�path�basename)r
�
is_complexs  r�__repr__zFuncData.__repr__2s���
�6�$�s�2�?�D�,>�?�?�@�@�A�A�	�%�J�J��J��=�	H�	H�,0�I�,>�,>�
�
�
�,.�G�,<�,<�T�]�,K�,K�,K�,K�M�
M�	H�)-�	�(:�(:�J�J�J�G�Gr)NNNNNNNFTFT)NNN)rrr�__doc__rr^rGr�rrrrrVs�������&�&�PBF�FJ�LP�@D� (� (� (� (�D	�	�	�D/�D/�D/�D/�L
H�
H�
H�
H�
Hrr)	NNNNTNFFT)r�r0r{�
scipy._libr�numpyrA�
numpy.testingrr�
scipy.special�specialr)�__all__r	r#rrrrrr�<module>r�s,��	�	�	�	�������������������!�!�!�!�!�!�
�
�
�
�������
B�
B�
B����������
c�c�c�
�
�
�$>B�6:�:?�EI�����BfH�fH�fH�fH�fH�fH�fH�fH�fH�fHr

Youez - 2016 - github.com/yon3zu
LinuXploit