관리-도구
편집 파일: test_half.cpython-311.pyc
� �܋f�^ � �n � d dl Z d dlZd dlZd dlmZmZmZmZ d dlm Z m Z mZmZ d� Z G d� d� � ZdS )� N)�uint16�float16�float32�float64)�assert_�assert_equal�_OLD_PROMOTION�IS_WASMc �� � ||i |�� t dd| z � � d S # t $ rB}t t |� � � | � � dk d| z � � Y d }~d S d }~ww xY w)NFz%Did not raise floating point %s errorr )r �FloatingPointError�str�find)�strmatch�callable�args�kwargs�excs �m/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib64/python3.11/site-packages/numpy/core/tests/test_half.py�assert_raises_fper s� � �D���$�!�&�!�!�!� ��7�(�B� D� D� D� D� D�� � D� D� D���C��� � �h�'�'�1�,�7�(�B� D� D� D� D� D� D� D� D� D�����D���s � � A+�7A&�&A+c �b � e Zd Zd� Zd� Zej � dddg� � d� � � Zej � dddg� � d� � � Z ej � dg d �� � ej � d g d �� � ej � de j e j g� � e j � � d� � � � � � � � � Zej � g d �e j e j dfe j e j dfg� � d� � � Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Z e j � � d� � � Zej � ej � � dk d�� � ej � ed�� � d� � � � � Zd� Z d S )!�TestHalfc �� � t j dt �� � | _ t | j _ t j | j t �� � | _ t j | j t �� � | _ t j t j dddt �� � t j dddt �� � f� � | _ t | j _ t j | j t �� � | _ t j | j t �� � | _ | j dd� | _ | j dd� | _ | j dd� | _ d S ) Ni ��dtype� � i� ���r i| � )�np�aranger �all_f16r r �arrayr �all_f32r �all_f64�concatenate� nonan_f16� nonan_f32� nonan_f64� finite_f16� finite_f32� finite_f64)�selfs r �setup_methodzTestHalf.setup_method s � ��y���7�7�7���$�����x���G�<�<�<����x���G�<�<�<��� ��!#��6�6�2�V�!L�!L�!L�!#��6�6�1�F�!K�!K�!K�!M�N� N��� '������$�.��@�@�@�����$�.��@�@�@��� �.��2��.����.��2��.����.��2��.����� c �f � t j | j t �� � }t | j � t �� � |� t �� � � � t j | j t �� � }t | j � t �� � |� t �� � � � t j | j t j �� � }t j |t �� � }t | j � t �� � |� t �� � � � t j dd� � }t j |t �� � }t j |t �� � }t ||� � dS )z[Checks that all 16-bit values survive conversion to/from 32-bit and 64-bit floatr i ���i N) r r! r"