-~J d Z ddlZddlZddlZddlZddlmZmZ ddl m Z g dZ G d de Z d Zdd ZddZd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd ZddZd Zd Zd dZ dS )!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)dragon4_positionaldragon4_scientific)absolute)RankWarning as_seriestrimseqtrimcoef getdomain mapdomainmapparmsformat_floatc e Zd ZdZdS )r z;Issued by chebfit when the design matrix is rank deficient.N)__name__ __module____qualname____doc__ n/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib64/python3.11/site-packages/numpy/polynomial/polyutils.pyr r / s EEDr r c t | dk r| S t t | dz dd D ]}| | dk r n| d|dz S )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)lenrange)seqis r r r 6 sf * 3xx1}} s3xx!|R,, A1v{{ 4AaC4yr Tc d | D }t d |D dk rt d t d |D rt d |rd |D }t d |D rg }|D ]}|j t j t k r_t j t | t j t }|d d |d d <