Файловый менеджер - Редактировать - /home/digitalm/venv/lib/python3.7/site-packages/numpy/polynomial/__pycache__/polyutils.cpython-37.pyc
Назад
B �5�g[V � @ s� d Z ddlZddlZddlZddlZddddddd gZG d d� de�Zdd� Z d+d d�Z d,dd�Zdd� Zdd � Z dd� Zdd� Zdd� Zdd� Zdd� Zdd� Zdd� Zdd� Zd d!� Zd"d#� Zd-d%d&�Zd'd(� Zd)d*� ZdS ).a Utility classes and functions for the polynomial modules. This module provides: error and warning objects; a polynomial base class; and some routines used in both the `polynomial` and `chebyshev` modules. Warning objects --------------- .. autosummary:: :toctree: generated/ RankWarning raised in least-squares fit for rank-deficient matrix. Functions --------- .. autosummary:: :toctree: generated/ as_series convert list of array_likes into 1-D arrays of common type. trimseq remove trailing zeros. trimcoef remove small trailing coefficients. getdomain return the domain appropriate for a given set of abscissae. mapdomain maps points between domains. mapparms parameters of the linear map between domains. � N�RankWarning� as_series�trimseq�trimcoef� getdomain� mapdomain�mapparmsc @ s e Zd ZdZdS )r z;Issued by chebfit when the design matrix is rank deficient.N)�__name__� __module__�__qualname__�__doc__� r r �P/home/digitalm-up/venv/lib/python3.7/site-packages/numpy/polynomial/polyutils.pyr + s c C sP t | �dkr| S x*tt | �d dd�D ]}| | dkr&P q&W | d|d � S dS )a� Remove small Poly series coefficients. Parameters ---------- seq : sequence Sequence of Poly series coefficients. This routine fails for empty sequences. Returns ------- series : sequence Subsequence with trailing zeros removed. If the resulting sequence would be empty, return the first element. The returned sequence may or may not be a view. Notes ----- Do not lose the type info if the sequence contains unknown objects. r � ���N)�len�range)�seq�ir r r r 2 s Tc s( dd� | D �}t dd� |D ��dkr,td��tdd� |D ��rFtd��|rXd d� |D �}td d� |D ��r�g }x�|D ]Z}|jt�t�kr�tjt|�t�t�d�}|dd� |dd�<