관리-도구
편집 파일: test_arraypad.cpython-37.pyc
B ��Fd�� � @ sl d Z ddlmZmZmZ ddlZddlmZm Z m Z mZ ddlm Z G dd� de�ZG dd � d e�ZG d d� de�ZG dd � d e�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG d d!� d!e�ZG d"d#� d#e�ZG d$d%� d%e�ZG d&d'� d'e�Zed(k�rhej �!� dS ))z(Tests for the array padding functions. � )�division�absolute_import�print_functionN)�assert_array_equal� assert_raises�assert_allclose�TestCase)�padc @ s$ e Zd Zdd� Zdd� Zdd� ZdS )�TestConditionalShortcutsc C sb t �d��ddd�}dd� |jD �}ddd d ddd dddg }x |D ]}t|t|||d�� qBW d S )N�x � � � c S s g | ]}d �qS ))r r � )�.0�axisr r ��/builddir/build/BUILDROOT/alt-python37-numpy-1.13.3-8.el8.x86_64/opt/alt/python37/lib64/python3.7/site-packages/numpy/lib/tests/test_arraypad.py� <listcomp> s zHTestConditionalShortcuts.test_zero_padding_shortcuts.<locals>.<listcomp>�constant�edge�linear_ramp�maximum�mean�median�minimum�reflect� symmetric�wrap)�mode)�np�arange�reshape�shaper r )�self�test�pad_amt�modesr r r r �test_zero_padding_shortcuts s z4TestConditionalShortcuts.test_zero_padding_shortcutsc C sb t �d��ddd�}dd� |jD �}ddd d g}x,|D ]$}tt||dd�t|||d d�� q6W d S )Nr r r r c S s g | ]}d �qS ))� r( r )r r r r r r s zITestConditionalShortcuts.test_shallow_statistic_range.<locals>.<listcomp>r r r r r )r r( )r �stat_length)r r r! r"