관리-도구
편집 파일: print_coercion_tables.cpython-311.pyc
� �܋f$ � �� � d Z ddlZddlmZ G d� d� � Zd� Zdd�Zd ddd �d�Ze dk �r8 e d � � eej d � � e � � e d� � e � � e d� � eej d ddd� � e � � e d� � eej d ddd� � e � � e d� � eej d ddd � � e � � e d� � eej d ddd � � e � � e d� � eej d dddd � � e d� � ed d d � � � dS dS )z:Prints type-coercion tables for the built-in NumPy types � N)� namedtuplec �@ � e Zd Zd� Zd� Zd� Z ej d� � ZdS )� GenericObjectc � � || _ d S �N)�v)�selfr s �v/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib64/python3.11/site-packages/numpy/testing/print_coercion_tables.py�__init__zGenericObject.__init__ s � ������ c � � | S r � �r �others r �__add__zGenericObject.__add__ � � ��r c � � | S r r r s r �__radd__zGenericObject.__radd__ r r �ON)�__name__� __module__�__qualname__r r r �np�dtyper r r r r sL � � � � � �� � �� � �� � � �B�H�S�M�M�E�E�Er r c � � t dd�� � | D ]}t |d�� � �t � � | D ]�}t |d�� � | D ]y}t j ||d� � rd}nMt j ||d� � rd}n4t j ||d� � rd }nt j ||d � � rd}nd}t |d�� � �zt � � ��d S )N�X� ��end�equiv�#�safe�=� same_kind�~�unsafe�.)�printr �can_cast)�ntypes�char�row�col�casts r �print_cancast_tabler/ s � � �#�3������ � �� �d������� �G�G�G�� � �� �c�s������ !� !�C��{�3��W�-�-� ������S�#�v�.�.� ������S�#�{�3�3� ������S�#�x�0�0� �������$�C� � � � � � ������ r Fc �T � t dd�� � | D ]}t |d�� � �t � � | D �]n}|dk rt }nt j |� � }t |d�� � | D �]&}|dk rt } nt j |� � } |r!t j ||� � g|�� � } n ||� � } | |� � }|r%t j | j |j � � j }nbt j | |� � }t |t j � � r |j j }n&t j t |� � � � j }n,# t $ r d}Y nt $ r d}Y nt $ r d}Y nw xY wt |d�� � ��(t � � ��pd S ) N�+r r r )r �!�@r! )r( r r � obj2sctype�array� promote_typesr r+ �add� isinstance�ndarray�type� ValueError� OverflowError� TypeError) r* �inputfirstvalue�inputsecondvalue� firstarray�use_promote_typesr+ r, �rowtyper- �coltype�rowvalue�colvalue�values r �print_coercion_tablerG * s� � � �#�3������ � �� �d������� �G�G�G�� !� !���#�:�:�#�G�G��m�C�(�(�G� �c�s������ !� !�C��c�z�z�'����-��,�,�� �� 8�!�x����)A�)A�(B�'�R�R�R�H�H�&�w��7�7�H�"�7�#3�4�4��$� :��+�H�N�H�N�K�K�P�D�D��F�8�X�6�6�E�!�%���4�4� :�$�{�/���!�x��U���4�4�9����� � � ����� � � � ������ � � ����� �����$�C� � � � � � �����C!� !s �CE�F�'F�4F�FT�r) �legacy�flagsc �0 �� ��� ddl m} ddddddd�}d d ddd dddd�}t dg d�� � } |ddd� � � |� � }i �t � � �|D ]�}�� |d � � �� |d � � |d �vri �|d <