Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/numpy/polynomial/__pycache__/_polybase.cpython-39.pyc
Ðазад
a e�hg� � @ sL d Z ddlZddlZddlZddlZddlmZ dgZ G dd� dej �ZdS )a Abstract base class for the various polynomial Classes. The ABCPolyBase class provides the methods needed to implement the common API for the various polynomial classes. It operates as a mixin, but uses the abc module from the stdlib, hence it is only available for Python >= 2.6. � N� )� polyutils�ABCPolyBasec @ s� e Zd ZdZdZdZdZe�dddddd d ddd d� �Z e�ddddddddddd� �Z ejdk Z edd� �Zeejdd� ��Zeejdd� ��Zeejd d!� ��Zeejd"d#� ��Zeejd$d%� ��Zeejd&d'� ��Zeejd(d)� ��Zeejd�d*d+���Zeejd,d-� ��Zeejd.d/� ��Zeejd0d1� ��Zeejd2d3� ��Zeejd4d5� ��Zeejd6d7� ��Z eejd8d9� ��Z!d:d;� Z"d<d=� Z#d>d?� Z$d@dA� Z%dBdC� Z&d�dEdF�Z'dGdH� Z(dIdJ� Z)dKdL� Z*dMdN� Z+e,dOdP� �Z-e,dQdR� �Z.e,dSdT� �Z/ed�dVdW��Z0dXdY� Z1dZd[� Z2d\d]� Z3d^d_� Z4d`da� Z5dbdc� Z6ddde� Z7dfdg� Z8dhdi� Z9djdk� Z:dldm� Z;dndo� Z<dpdq� Z=drds� Z>dtdu� Z?dvdw� Z@dxdy� ZAdzd{� ZBd|d}� ZCd~d� ZDd�d�� ZEd�d�� ZFd�d�� ZGd�d�� ZHd�d�� ZId�d�� ZJd�d�� ZKd�d�� ZLd�d�� ZMd�d�d��ZNd�d�� ZOd�d�d��ZPd�d�� ZQd�g dfd�d��ZRd�d�d��ZSd�d�� ZTd�d�d��ZUe,d�d�d���ZVe,g ddDfd�d���ZWe,d�d�d���ZXe,d�d�d���ZYe,d�d�d���ZZdS )�r a An abstract base class for immutable series classes. ABCPolyBase provides the standard Python numerical methods '+', '-', '*', '//', '%', 'divmod', '**', and '()' along with the methods listed below. .. versionadded:: 1.9.0 Parameters ---------- coef : array_like Series coefficients in order of increasing degree, i.e., ``(1, 2, 3)`` gives ``1*P_0(x) + 2*P_1(x) + 3*P_2(x)``, where ``P_i`` is the basis polynomials of degree ``i``. domain : (2,) array_like, optional Domain to use. The interval ``[domain[0], domain[1]]`` is mapped to the interval ``[window[0], window[1]]`` by shifting and scaling. The default value is the derived class domain. window : (2,) array_like, optional Window, see domain for its use. The default value is the derived class window. symbol : str, optional Symbol used to represent the independent variable in string representations of the polynomial expression, e.g. for printing. The symbol must be a valid Python identifier. Default value is 'x'. .. versionadded:: 1.24 Attributes ---------- coef : (N,) ndarray Series coefficients in order of increasing degree. domain : (2,) ndarray Domain that is mapped to window. window : (2,) ndarray Window that domain is mapped to. symbol : str Symbol representing the independent variable. Class Attributes ---------------- maxpower : int Maximum power allowed, i.e., the largest number ``n`` such that ``p(x)**n`` is allowed. This is to limit runaway polynomial size. domain : (2,) ndarray Default domain of the class. window : (2,) ndarray Default window of the class. N�d u ⁰� ¹� ²� ³u ⁴u ⁵u ⁶u ⁷u ⁸u ⁹) �0�1�2�3�4�5�6�7�8�9u ₀u ₁u ₂u ₃u ₄u ₅u ₆u ₇u ₈u ₉�ntc C s | j S �N)�_symbol��self� r ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/numpy/polynomial/_polybase.py�symboln s zABCPolyBase.symbolc C s d S r r r r r r �domainr s zABCPolyBase.domainc C s d S r r r r r r �windoww s zABCPolyBase.windowc C s d S r r r r r r � basis_name| s zABCPolyBase.basis_namec C s d S r r ��c1�c2r r r �_add� s zABCPolyBase._addc C s d S r r r r r r �_sub� s zABCPolyBase._subc C s d S r r r r r r �_mul� s zABCPolyBase._mulc C s d S r r r r r r �_div� s zABCPolyBase._divc C s d S r r )�c�pow�maxpowerr r r �_pow� s zABCPolyBase._powc C s d S r r )�xr% r r r �_val� s zABCPolyBase._valc C s d S r r )r% �m�k�lbnd�sclr r r �_int� s zABCPolyBase._intc C s d S r r )r% r+ r. r r r �_der� s zABCPolyBase._derc C s d S r r )r) �y�deg�rcond�fullr r r �_fit� s zABCPolyBase._fitc C s d S r r )�offr. r r r �_line� s zABCPolyBase._linec C s d S r r )r% r r r �_roots� s zABCPolyBase._rootsc C s d S r r )�rr r r � _fromroots� s zABCPolyBase._fromrootsc C s6 t | j�t |j�krdS t�| j|jk�s.dS dS dS )aG Check if coefficients match. .. versionadded:: 1.6.0 Parameters ---------- other : class instance The other class must have the ``coef`` attribute. Returns ------- bool : boolean True if the coefficients are the same, False otherwise. FTN)�len�coef�np�all�r �otherr r r �has_samecoef� s zABCPolyBase.has_samecoefc C s t �| j|jk�S )a? Check if domains match. .. versionadded:: 1.6.0 Parameters ---------- other : class instance The other class must have the ``domain`` attribute. Returns ------- bool : boolean True if the domains are the same, False otherwise. )r= r>