관리-도구
편집 파일: test_ufunclike.cpython-311.pyc
� �܋f� � �b � d dl Zd dlmZ d dlmc mZ d dl m Z mZmZm Z mZ G d� d� � ZdS )� N)�assert_�assert_equal�assert_array_equal�assert_warns� assert_raisesc �, � e Zd Zd� Zd� Zd� Zd� Zd� ZdS )� TestUfunclikec �T � t j t j t j t j dddg� � }t j |j t � � }t j g d�� � }t j |� � }t ||� � t j ||� � }t ||� � t ||� � |� t j � � }t t � � 5 t j |� � d d d � � d S # 1 swxY w Y d S )N� � @� �)TFFFFF)�nx�array�inf�nan�zeros�shape�bool�ufl�isposinfr �astype�np�complex_r � TypeError��self�a�out�tgt�ress �q/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib64/python3.11/site-packages/numpy/lib/tests/test_ufunclike.py� test_isposinfzTestUfunclike.test_isposinf �/ � ��H�b�f�r�v�g�r�v�s�C��>�?�?���h�q�w��%�%���h�@�@�@�A�A���l�1�o�o���S�#�����l�1�c�"�"���S�#�����S�#���� �H�H�R�[�!�!�� �9� %� %� � ��L��O�O�O� � � � � � � � � � � � ���� � � � � � � �;D�D!�$D!c �T � t j t j t j t j dddg� � }t j |j t � � }t j g d�� � }t j |� � }t ||� � t j ||� � }t ||� � t ||� � |� t j � � }t t � � 5 t j |� � d d d � � d S # 1 swxY w Y d S )Nr r r )FTFFFF)r r r r r r r r �isneginfr r r r r r r s r! � test_isneginfzTestUfunclike.test_isneginf r# r$ c � � t j g d�g d�g� � }t j |j t � � }t j g d�g d�g� � }t j |� � }t ||� � t j ||� � }t ||� � t ||� � t t j d� � d� � d S )N)� �?皙�����?g �?g������?)� �皙�����g ��g�������)r) r) r) r) )r+ r+ r+ r+ g��Q� @� )r r r r �floatr �fixr r s r! �test_fixzTestUfunclike.test_fix) s� � ��H�*�*�*�,D�,D�,D�E�F�F���h�q�w��&�&���h�(�(�(�*>�*>�*>�?�@�@���g�a�j�j���S�#�����g�a��o�o���S�#�����S�#�����S�W�T�]�]�A�&�&�&�&�&� c � �� G �fd�dt j � � �t j ddg� � } �|d�� � }t j |� � }t |t j ddg� � � � t t |�� � � � t |j d� � |d }d |_ t j |� � }t t |�� � � � t |j d � � d S )Nc �* �� e Zd Zdd�Zd� fd� Zd� ZdS )�5TestUfunclike.test_fix_with_subclass.<locals>.MyArrayNc �f � t j |d�� � � | � � }||_ |S )NT)�copy)r r �view�metadata)�cls�datar8 r s r! �__new__z=TestUfunclike.test_fix_with_subclass.<locals>.MyArray.__new__7 s0 � ��h�t�$�/�/�/�4�4�S�9�9��'���� r1 c �@ �� t |�� � r| j |_ |S �N)� isinstancer8 )r �obj�context�MyArrays �r! �__array_wrap__zDTestUfunclike.test_fix_with_subclass.<locals>.MyArray.__array_wrap__<