https://t.me/RX1948
Server : Apache
System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User : dh_edsupp ( 6597262)
PHP Version : 8.2.26
Disable Function : NONE
Directory :  /lib/python3/dist-packages/numpy/lib/tests/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/numpy/lib/tests/__pycache__/test_ufunclike.cpython-310.pyc
o

6��a��@sTddlZddlmZddlmmZddl	m
Z
mZmZm
Z
mZGdd�d�ZdS)�N)�assert_�assert_equal�assert_array_equal�assert_warns�
assert_raisesc@s<eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
S)�
TestUfunclikecC�t�tjtjtjdddg�}t�|jt�}t�gd��}t�|�}t	||�t�||�}t	||�t	||�|�
tj�}t
t��t�|�Wd�dS1sRwYdS)N��@��)TFFFFF)�nx�array�inf�nan�zeros�shape�bool�ufl�isposinfr�astype�np�complex_r�	TypeError��self�a�out�tgt�res�r�@/usr/lib/python3/dist-packages/numpy/lib/tests/test_ufunclike.py�
test_isposinf�




"�zTestUfunclike.test_isposinfcCr)Nr	r
r)FTFFFF)rr
rrrrrr�isneginfrrrrrrrrrr �
test_isneginfr"zTestUfunclike.test_isneginfcCs�t�gd�gd�g�}t�|jt�}t�gd�gd�g�}t�|�}t||�t�||�}t||�t||�tt�d�d�dS)N)��?皙�����?g�?g������?)��皙�����g��g�������)r%r%r%r%)r'r'r'r'g��Q�	@�)rr
rr�floatr�fixrrrrr �test_fix)s



zTestUfunclike.test_fixcs�G�fdd�dtj��t�ddg�}�|dd�}t�|�}t|t�ddg��tt|���t|j	d�|d	}d
|_	t�|�}tt|���t|j	d
�dS)Ncs,eZdZddd�Zd�fdd�	Zdd�ZdS)	z5TestUfunclike.test_fix_with_subclass.<locals>.MyArrayNcSstj|dd��|�}||_|S)NT)�copy)rr
�view�metadata)�cls�datar/rrrr �__new__7sz=TestUfunclike.test_fix_with_subclass.<locals>.MyArray.__new__cst|��r	|j|_|S�N)�
isinstancer/)r�obj�context��MyArrayrr �__array_wrap__<s
zDTestUfunclike.test_fix_with_subclass.<locals>.MyArray.__array_wrap__cSst|dd�|_|S)Nr/)�getattrr/)rr5rrr �__array_finalize__AszHTestUfunclike.test_fix_with_subclass.<locals>.MyArray.__array_finalize__r3)�__name__�
__module__�__qualname__r2r9r;rr7rr r86s
r8r&r(�foo)r/����)r.�bar)
r�ndarrayr
rr+rrr4rr/)rr�m�f�m0d�f0drr7r �test_fix_with_subclass5s

z$TestUfunclike.test_fix_with_subclasscCsXtttjddgt�d�d�tttjddgt�d�d�tttjddgt�d�d�dS)Nr@�)�y)r�DeprecationWarningrr+r�emptyrr#)rrrr �test_deprecatedSs zTestUfunclike.test_deprecatedcCs�tj}t�|�}tj}t||�tt|�t|��d}t�|�}t�d�}t||�tt|�t|��t�d�}tj||d�}t	||u�dS)Ng333333�rr	)r)
rrr�True_r�typer+�float64r
r)r�x�actual�expectedrrrr �test_scalarYs





zTestUfunclike.test_scalarN)	r<r=r>r!r$r,rHrMrTrrrr r	sr)�numpyr�
numpy.core�corer�numpy.lib.ufunclike�lib�	ufuncliker�
numpy.testingrrrrrrrrrr �<module>s


https://t.me/RX1948 - 2025