관리-도구
편집 파일: test_elementwise_functions.cpython-311.pyc
� �܋f� � �h � d dl mZ d dlmZ ddlmZmZ ddlmZmZ ddl m Z mZmZm Z d� Zd� Zd � Zd S )� )�getfullargspec)� assert_raises� )�asarray�_elementwise_functions)�bitwise_left_shift�bitwise_right_shift)�_dtype_categories�_boolean_dtypes�_floating_dtypes�_integer_dtypesc �D � t t | � � j � � S �N)�lenr �args)�funcs ��/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib64/python3.11/site-packages/numpy/array_api/tests/test_elementwise_functions.py�nargsr s � ��~�d�#�#�(�)�)�)� c �� ���� i dd�dd�dd�dd�dd�dd�d d�d d�dd�d d�dd�dd�dd�dd�dd�dd�dd�i dd�dd�dd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�d%d�d&d�d'd�d(d�d)d�d*d��i d+d�d,d�d-d�d.d�d/d0�d1d0�d2d0�d3d0�d4d�d5d�d6d�d7d�d8d�d9d�d:d�d;d�d<d��ddddddddd=��} d>� } |� � D ]��| � � � D ]�\ }}t | }t t |� � �t �� � d?k r: |� � D ].��j |vs �j |vrt t ���fd@�� � �/�t�j |vrt t ��fdA�� � ����d S )BN�abs�numeric�acoszfloating-point�acosh�add�asin�asinh�atan�atan2zreal floating-point�atanh�bitwise_andzinteger or boolean�bitwise_invertr �integer� bitwise_orr �bitwise_xor�ceilzreal numeric�conjzcomplex floating-point�cos�cosh�divide�equal�all�exp�expm1�floor�floor_divide�greater� greater_equal�imag�isfinite�isinf�isnan�less� less_equal�log� logaddexp�log10�log1p�log2�logical_and�boolean�logical_not� logical_or�logical_xor�multiply�negative� not_equal�positive�pow�real� remainder�round�sign)�sin�sinh�sqrt�square�subtract�tan�tanh�truncc 3 � K � t D ]} t d| �� � V � �t D ]} t d| �� � V � �t D ]} t d| �� � V � �d S )N� )�dtypeFg �?)r r r r )�ds r �_array_valsz(test_function_types.<locals>._array_valsV s� � � � � � &� &�A��!�1�%�%�%�%�%�%�%� � *� *�A��%�q�)�)�)�)�)�)�)�!� (� (�A��#�Q�'�'�'�'�'�'�'� (� (r r c � �� � ��� � S r � )r �x�ys ���r �<lambda>z%test_function_types.<locals>.<lambda>e s �� ���a���� r c � �� � �� � S r rZ )r r[ s ��r r] z%test_function_types.<locals>.<lambda>h s �� �T�T�!�W�W� r )�itemsr �getattrr r rV r � TypeError)� elementwise_function_input_typesrX � func_name�types�dtypesr r[ r\ s @@@r �test_function_typesrf s� ���� � <(� �y�<(�� �<(� �!�<(� �y� <(� � �<(� �!� <(� � �<(� �&�<(� �!�<(� �+�<(� �.�<(� �i�<(� �*�<(� �y�<(� �+�<(� ��!<(�"