Dashboard
PHP:
8.2.30
OS:
Linux
User:
dh_nv8b2m
/
/
usr
/
lib
/
python3
/
dist-packages
/
numpy
/
polynomial
/
__pycache__
📤 Upload
📝 New File
📁 New Folder
Close
Editing: polyutils.cpython-310.pyc
o 6��a[V � @ s� d Z ddlZddlZddlZddlZg d�ZG dd� de�Zdd� Z d,d d �Z d-dd�Zd d� 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 �</usr/lib/python3/dist-packages/numpy/polynomial/polyutils.pyr + s r c C sJ t | �dkr| S tt | �d dd�D ] }| | dkr nq| d|d � 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�ir r r r 2 s �r Tc s dd� | D �}t dd� |D ��dkrtd��tdd� |D ��r#td��|r,d d� |D �}td d� |D ��rig }|D ]-}|jt�t�kr_tjt|�t�t�d�}|dd� |dd�<