Submit
Path:
~
/
/
proc
/
thread-self
/
root
/
opt
/
alt
/
python35
/
lib64
/
python3.5
/
site-packages
/
scipy
/
fftpack
/
__pycache__
/
File Content:
pseudo_diffs.cpython-35.opt-1.pyc
��We7 � @ s� d Z d d l m Z m Z m Z d d d d d d d d d d g Z d d l m Z m Z m Z m Z m Z m Z m Z m Z d d l m Z d d l m Z d d l Z e j e j � [ i Z d d e d d � Z [ i Z d e d d � Z [ i Z d e d d � Z [ i Z e d d � Z [ d d � Z i Z d e d d � Z [ i Z d e d d � Z [ i Z d e d d � Z [ i Z d e d d � Z [ i Z d e d d � Z [ d S)z1 Differential and pseudo-differential operators. � )�division�print_function�absolute_import�diff�tilbert�itilbert�hilbert�ihilbert�cs_diff�cc_diff�sc_diff�ss_diff�shift)�pi�asarray�sin�cos�sinh�cosh�tanh�iscomplexobj� )�convolve)�_datacopiedNc C s@ t | � } | d k r | St | � rR t | j | | � d t | j | | � S| d k ro d t | } n d } t | � } | j | | | f � } | d k rt | � d k r� x | r� | j � q� W| | d d � } t j | | d | d d �} | | | | | f <t | | � } t j | | d | d d | �S)a+ Return k-th derivative (or integral) of a periodic sequence x. If x_j and y_j are Fourier coefficients of periodic functions x and y, respectively, then:: y_j = pow(sqrt(-1)*j*2*pi/period, order) * x_j y_0 = 0 if order is not 0. Parameters ---------- x : array_like Input array. order : int, optional The order of differentiation. Default order is 1. If order is negative, then integration is carried out under the assumption that ``x_0 == 0``. period : float, optional The assumed period of the sequence. Default is ``2*pi``. Notes ----- If ``sum(x, axis=0) = 0`` then ``diff(diff(x, k), -k) == x`` (within numerical accuracy). For odd order and even ``len(x)``, the Nyquist mode is taken zero. r y �?N� g �?� c S s | r t | | | � Sd S)Nr )�pow)�k�order�c� r �/pseudo_diffs.py�kernelG s zdiff.<locals>.kernel�d�zero_nyquistr �swap_real_imag�overwrite_x)r r r �real�imagr �len�get�popitemr �init_convolution_kernelr ) �xr �period�_cache�tmpr �n�omegar"