← Back
Editing: _signaltools.cpython-311.pyc
� d�c&` � � � d dl Z d dlZd dlZd dlmZ ddlmZ ddlmZ ddl m Z mZmZ d dl mZmZ d dlmZ d d lmZ d dlZd d lmZ ddlmZ ddlmZmZmZm Z m!Z! dd l"m#Z#m$Z$m%Z% ddl&m'Z' ddl(m(Z( d dl)Z)g d�Z*d ddd�Z+d d dddddd�Z,d� Z-d� Z.d]d�Z/d^d�Z0d_d�Z1d� Z2d`d�Z3d`d�Z4d � Z5dad!�Z6d"� Z7dad#�Z8dbd%�Z9d&� Z:d'� Z;d(� Z<d)� Z=dcd,�Z>ddd-�Z?d^d.�Z@d/� ZAd]d0�ZBded1�ZCdfd3�ZDdfd4�ZEdgd5�ZFdhd7�ZGd]d8�ZHd9� ZIdid:�ZJd]d;�ZKd<� ZLdjd?�ZMdkdA�ZNd`dB�ZOdC� ZPdkdD�ZQdkdE�ZRdF� ZSdkdG�ZTdldI�ZU dmdL�ZVdM� ZWdndO�ZXdP� ZYdQ� ZZdhdR�Z[ dodU�Z\dV� Z]dW� Z^dhdX�Z_dpdY�Z`dqd\�ZadS )r� N)�cKDTree� )� _sigtools)�dlti)�upfirdn�_output_len�_upfirdn_modes)�linalg�fft)�_init_nd_shape_and_axes)�prod)�lambertw)� get_window)� axis_slice�axis_reverse�odd_ext�even_ext� const_ext)�cheby1� _validate_sos�zpk2sos)�firwin)�_sosfilt)!� correlate�correlation_lags�correlate2d�convolve� convolve2d�fftconvolve� oaconvolve�order_filter�medfilt� medfilt2d�wiener�lfilter�lfiltic�sosfilt� deconvolve�hilbert�hilbert2� cmplx_sort�unique_roots�invres�invresz�residue�residuez�resample� resample_poly�detrend� lfilter_zi� sosfilt_zi�sosfiltfilt�choose_conv_method�filtfilt�decimate�vectorstrength� )�valid�same�full� )�fill�pad�wrap�circular�symm� symmetric�reflectc �b � t | S # t $ r}t d� � |�d }~ww xY w)N�5Acceptable mode flags are 'valid', 'same', or 'full'.)� _modedict�KeyError� ValueError)�mode�es �;/usr/lib/python3/dist-packages/scipy/signal/_signaltools.py�_valfrommoderO ( sJ � �7������� 7� 7� 7�� /� 0� 0�56� 7�����7���s � � .�)�.c �h � t | dz S # t $ r}t d� � |�d }~ww xY w)Nr; zZAcceptable boundary flags are 'fill', 'circular' (or 'wrap'), and 'symmetric' (or 'symm').)� _boundarydictrJ rK )�boundaryrM s rN �_bvalfromboundaryrS 0 sY � �M��X�&�!�+�+��� M� M� M�� E� F� F�KL� M�����M���s � � 1�,�1c � ��� | dk rdS �sdS |�t t �� � � � }t ��fd�|D � � � � }t ��fd�|D � � � � }|s|st d� � �| S )a+ Determine if inputs arrays need to be swapped in `"valid"` mode. If in `"valid"` mode, returns whether or not the input arrays need to be swapped depending on whether `shape1` is at least as large as `shape2` in every calculated dimension. This is important for some of the correlation and convolution implementations in this module, where the larger array input needs to come before the smaller array input when operating in this mode. Note that if the mode provided is not 'valid', False is immediately returned. r<