관리-도구
편집 파일: test_arraypad.cpython-311.pyc
� �܋f.� � �� � d Z ddlZddlZddlmZmZmZ ddlm Z ej d ej d z ej d z ej d z Zd dii d diddiddiddiddidd idd ii i d�Z G d� d� � Z G d� d� � Z G d� d� � Z G d� d� � Z G d� d� � Z G d� d� � Z G d� d� � Z G d� d� � Z G d� d � � Z G d!� d"� � Z G d#� d$� � Zd%� Zd&� Zej � d'g d(�� � d)� � � Z G d*� d+� � Zej � d'e� � � � � d,� � � Zd-� Z ej � d'd.d/ e!� � dd0d1g� � d2� � � Z"ej � d'e� � � � � d3� � � Z#ej � d'e� � � � � d4� � � Z$ej � d5e� � ej � d'e� � � � � d6� � � � � Z%dS )7z(Tests for the array padding functions. � N)�assert_array_equal�assert_allclose�assert_equal)� _as_pairs�uint�int�float�complex�constant_values� end_values�stat_length�reflect_type�even)�constant�edge�linear_ramp�maximum�mean�median�minimum�reflect� symmetric�wrap�emptyc �2 � e Zd Zd� Zd� Zd� Zd� Zd� Zd� ZdS )�TestAsPairsc � � t j ddggdz � � }ddgdggfD ]"}t |d� � }t ||� � �#t � � }t t |d� � t j ||ggdz � � � � dS )z Test casting for a single value.� � N��np�arrayr r �object��self�expected�x�result�objs �p/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib64/python3.11/site-packages/numpy/lib/tests/test_arraypad.py�test_single_valuezTestAsPairs.test_single_value! s� � ��8�a��V�H�r�M�*�*���a�S�A�3�%�� +� +�A��q�"�%�%�F����*�*�*�*��h�h����c�2����H�s�C�j�\�B�&�'�'� � � � � � c � � t j ddggdz � � }ddgddggfD ]"}t |d� � }t ||� � �#t � � }t t d|gd� � t j d|ggdz � � � � t t dgdggd� � t j ddgddgg� � � � t t dg|ggd� � t j ddg||gg� � � � dS )z-Test proper casting for two different values.r � r �a� Nr r$ s r* �test_two_valueszTestAsPairs.test_two_values. s1 � � �8�a��V�H�r�M�*�*���a�&�A�q�6�(�#� +� +�A��q�"�%�%�F����*�*�*�*��h�h����s�C�j�"�%�%��H�s�C�j�\�B�&�'�'� � � � ���s�Q�C�j�!�$�$��H�q�!�f�q�!�f�%�&�&� � � � ���u�s�e�n�a�(�(��H�s�C�j�3��*�-�.�.� � � � � r, c � � d}t t d dd�� � |� � t t d dd�� � |� � d S )N)�NNr3 r3 r F��as_indexT)r r �r% r&