관리-도구
편집 파일: test_helper.cpython-37.pyc
B ��Fd� � @ s� d Z ddlmZmZmZ ddlZddlmZm Z m Z ddlmZ ddlmZ ddl mZ G dd � d e�ZG d d� de�ZG dd � d e�ZG dd� de�ZG dd� de�Zedkr�e � dS )zfTest functions for fftpack.helper module Copied from fftpack.helper by Pearu Peterson, October 2005 � )�division�absolute_import�print_functionN)�TestCase�run_module_suite�assert_array_almost_equal)�fft)�pi)� _FFTCachec @ s$ e Zd Zdd� Zdd� Zdd� ZdS )�TestFFTShiftc C s� ddddddddd g }dddd dddddg }t t�|�|� t t�|�|� dddddd dddd g }d dddd dddddg }t t�|�|� t t�|�|� d S )Nr � � � � ���������������)r r �fftshift� ifftshift)�self�x�y� r ��/builddir/build/BUILDROOT/alt-python37-numpy-1.13.3-8.el8.x86_64/opt/alt/python37/lib64/python3.7/site-packages/numpy/fft/tests/test_helper.py�test_definition s zTestFFTShift.test_definitionc C s6 x0dD ](}t j�|f�}tt�t�|��|� qW d S )N)r r � �d �� )�np�randomr r r r )r �nr r r r �test_inverse s zTestFFTShift.test_inversec C s� dddgdddgddd gg}d ddgdddgdddgg}t tj|d d�|� t tj|dd�tj|dd�� t tj|d d�|� t tj|dd�tj|dd�� d S ) Nr r r r r r r r r )r r )�axes)r )r r r r )r ZfreqsZshiftedr r r �test_axes_keyword s zTestFFTShift.test_axes_keywordN)�__name__� __module__�__qualname__r r# r% r r r r r s r c @ s e Zd Zdd� ZdS )�TestFFTFreqc C s� ddddddddd g }t d t�d � |� t d t t�d t� |� dddddddddd g }t dt�d� |� t dt t�dt� |� d S ) Nr r r r r r r r r r r � )r r �fftfreqr )r r r r r r - s zTestFFTFreq.test_definitionN)r&