관리-도구
편집 파일: test_indexerrors.cpython-311.pyc
� �܋f � �8 � d dl Zd dlmZmZ G d� d� � ZdS )� N)� assert_raises�assert_raises_regexc �B � e Zd ZdZd� Zd� Zd� Zd� Zd� Zd� Z d� Z d � Zd S )�TestIndexErrorsz9Tests to exercise indexerrors not covered by other tests.c �" � t j d� � }t t |j dgd�� � t t |j dgd�� � t t |j dgdd�� � t t |j dgdd�� � d S ) ztake from a 0-length dimension)� � r � r r ��axis� �wrap)r �mode�clipN)�np�emptyr � IndexError�take)�self�xs �t/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib64/python3.11/site-packages/numpy/core/tests/test_indexerrors.py�test_arraytypes_fasttakez(TestIndexErrors.test_arraytypes_fasttake s� � ��H�\�"�"���j�!�&�1�#�A�6�6�6�6��j�!�&�1�#�A�6�6�6�6��j�!�&�1�#�A�F�C�C�C�C��j�!�&�1�#�A�F�C�C�C�C�C�C� c �� � t j dt �� � }t t |j dg� � t j dt �� � }t t |j dgd�� � t t |j dgd�� � t t |j dg� � t t |j dgd� � � t t |j dgd � � � d S )N� ��dtype� �r r r r r r )r r )r �zeros�objectr r r )r �ds r �test_take_from_objectz%TestIndexErrors.test_take_from_object s� � ��H�Q�f�%�%�%���j�!�&�1�#�.�.�.� �H�V�6�*�*�*���j�!�&�1�#�A�6�6�6�6��j�!�&�1�#�A�6�6�6�6��j�!�&�1�#�.�.�.��j�!�&�1�#�F�;�;�;�;��j�!�&�1�#�F�;�;�;�;�;�;r c � � t j dt �� � }t t |j d� � t j dt �� � }t t |j d� � t j dt �� � }t t |j dd� � t j dt �� � }t t |j dd� � d S )Nr r � r )r r r )r r r! r r �item�itemset�r �as r �test_multiindex_exceptionsz*TestIndexErrors.test_multiindex_exceptions s� � ��H�Q�f�%�%�%���j�!�&�"�-�-�-��H�V�6�*�*�*���j�!�&�&�1�1�1��H�Q�f�%�%�%���j�!�)�R��3�3�3��H�V�6�*�*�*���j�!�)�V�Q�7�7�7�7�7r c � � t j d� � }t t |j dd� � t j dt �� � }t t |j dd� � t j d� � }t t |j dd� � t j dt �� � }t t |j dd� � d S )N)r r �d r r )r r r )r r r r �putr! r( s r �test_put_exceptionsz#TestIndexErrors.test_put_exceptions* s� � ��H�V�����j�!�%��a�0�0�0��H�V�6�*�*�*���j�!�%��a�0�0�0��H�Y�����j�!�%��a�0�0�0��H�Y�f�-�-�-���j�!�%��a�0�0�0�0�0r c �� ��� d� �t j g d�� � �t t �fd�� � t t �fd�� � t t ��fd�� � t t ��fd�� � t j g d�� � �t t �fd�� � t t ��fd �� � t j g d�� � �t t �fd �� � t t ��fd�� � t j g d�� � �t t �fd�� � t t ��fd �� � t j g d�� � �t t �fd�� � t t ��fd�� � t j g d�� � �t t �fd�� � t t ��fd�� � t j g d�� � �t t �fd�� � t t ��fd�� � t j g d�� � �t t �fd�� � t t ��fd�� � dS )zcases in iterators.cc � � || |<