OwlCyberSecurity - MANAGER
Edit File: polyutils.cpython-38.pyc
U �p�]�S � @ s d Z ddlmZmZmZ ddlZddlZddlZdddddd d ddd g Z G dd� de �ZG dd� de�Z G dd� de �ZG dd � d e�Zdd� Zd0dd�Zd1dd �Zdd � Zdd� Zdd� Zdd� Zdd� Zdd� Zdd � Zd!d"� Zd#d$� Zd%d&� Zd'd(� Zd2d*d+�Zd,d-� Z d.d/� Z!dS )3aQ 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. Error objects ------------- .. autosummary:: :toctree: generated/ PolyError base class for this sub-package's errors. PolyDomainError raised when domains are mismatched. Warning objects --------------- .. autosummary:: :toctree: generated/ RankWarning raised in least-squares fit for rank-deficient matrix. Base class ---------- .. autosummary:: :toctree: generated/ PolyBase Obsolete base class for the polynomial classes. Do not use. 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. � )�division�absolute_import�print_functionN�RankWarning� PolyError�PolyDomainError� as_series�trimseq�trimcoef� getdomain� mapdomain�mapparms�PolyBasec @ s e Zd ZdZdS )r z;Issued by chebfit when the design matrix is rank deficient.N��__name__� __module__�__qualname__�__doc__� r r �</usr/lib/python3/dist-packages/numpy/polynomial/polyutils.pyr = s c @ s e Zd ZdZdS )r z%Base class for errors in this module.Nr r r r r r A s c @ s e Zd ZdZdS )r z�Issued by the generic Poly class when two domains don't match. This is raised when an binary operation is passed Poly objects with different domains. Nr r r r r r E s c @ s e Zd ZdZdS )r z� Base class for all polynomial types. Deprecated in numpy 1.9.0, use the abstract ABCPolyBase class instead. Note that the latter requires a number of virtual functions to be implemented. Nr r r r r r R s c C sN t | �dkr| S tt | �d dd�D ]}| | dkr$ q:q$| 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 a s Tc s dd� | D �}t dd� |D ��dkr,td��tdd� |D ��rFtd��|rXdd� |D �}td d� |D ��r�g }|D ]Z}|jt�t�kr�tjt|�t�t�d �}|dd� |dd�<