관리-도구
편집 파일: polyutils.cpython-311.pyc
� �܋f�Z � �� � d Z ddlZddlZddlZddlZddlmZmZ ddl m Z g d�Z G d� de� � Z d� Zdd �Zdd�Zd� Zd � Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zdd�Zd� Zd� Zd d�Z 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_positional�dragon4_scientific)�absolute)�RankWarning� as_series�trimseq�trimcoef� getdomain� mapdomain�mapparms�format_floatc � � e Zd ZdZdS )r z;Issued by chebfit when the design matrix is rank deficient.N)�__name__� __module__�__qualname__�__doc__� � �Q/opt/cloudlinux/venv/lib64/python3.11/site-packages/numpy/polynomial/polyutils.pyr r / s � � � � � �E�E��Dr 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)�len�range)�seq�is r r r 6 sf � �* �3�x�x�1�}�}�� ��s�3�x�x�!�|�R��,�,� � �A��1�v��{�{��� ��4�A�a�C�4�y�r Tc � �� d� | D � � }t d� |D � � � � dk rt d� � �t d� |D � � � � rt d� � �|rd� |D � � }t d� |D � � � � r�g }|D ]�}|j t j t � � k r_t j t |� � t j t � � � � � }|d d � |d d �<