관리-도구
편집 파일: test_indexerrors.cpython-37.pyc
B ��FdJ � @ sR d dl mZmZmZ d dlZd dlmZmZm Z G dd� de�Z edkrNe� dS )� )�division�absolute_import�print_functionN)�TestCase�run_module_suite� assert_raisesc @ sH e Zd ZdZdd� Zdd� Zdd� Zdd � Zd d� Zdd � Z dd� Z dS )�TestIndexErrorsz9Tests to exercise indexerrors not covered by other tests.c C sb t �d�}tt|jdgdd� tt|jdgdd� tt|jdgddd� tt|jdgddd� d S ) ztake from a 0-length dimension)� � r � r r )�axis� �wrap)r �mode�clipN)�np�emptyr � IndexError�take)�self�x� r ��/builddir/build/BUILDROOT/alt-python37-numpy-1.13.3-8.el8.x86_64/opt/alt/python37/lib64/python3.7/site-packages/numpy/core/tests/test_indexerrors.py�test_arraytypes_fasttake s z(TestIndexErrors.test_arraytypes_fasttakec C s� t jdtd�}tt|jdg� t jdtd�}tt|jdgdd� tt|jdgdd� tt|jdg� tt|jdgdd � tt|jdgd d � d S )N� )�dtype� )r r r )r r r )r r )r �zeros�objectr r r )r �dr r r �test_take_from_object s z%TestIndexErrors.test_take_from_objectc C sx t jdtd�}tt|jd� t jdtd�}tt|jd� t jdtd�}tt|jdd� t jdtd�}tt|jdd� d S )Nr )r � )r r )r r r )r r r r r �item�itemset)r �ar r r �test_multiindex_exceptions s z*TestIndexErrors.test_multiindex_exceptionsc C st t �d�}tt|jdd� t jdtd�}tt|jdd� t �d�}tt|jdd� t jdtd�}tt|jdd� d S )N)r r �d r )r )r r r )r r r r �putr )r r$ r r r �test_put_exceptions) s z#TestIndexErrors.test_put_exceptionsc s� dd� �t �dddg�� tt� fdd�� tt� fdd�� tt� �fd d�� tt� �fd d�� t �dddg�� tt� fdd�� tt� �fd d�� t �dddg�� tt� fdd�� tt� �fdd�� t �dddg�� tt� fdd�� tt� �fdd�� t �dddg�� tt� fdd�� tt� �fdd�� t �dddg�� tt� fdd�� tt� �fdd�� t �dddg�� tt� fdd�� tt� �fdd�� t �dddg�� tt� fdd�� tt� �fdd�� dS )zcases in iterators.cc S s || |<