Server : Apache System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64 User : dh_edsupp ( 6597262) PHP Version : 8.2.26 Disable Function : NONE Directory : /lib/python3/dist-packages/numpy/polynomial/__pycache__/ |
Upload File : |
o 6��a� � @ sn d Z ddlZddlmZ ddlmZ ddlm Z ddlmZ g d�Z e jZdd � Zd d� Ze�ddg�Ze�dg�Ze�dg�Ze�ddg�Zd d� Zdd� Zdd� Zdd� Zdd� Zdd� Zdd� Zd@dd�ZdAdd�Zdg dddfd d!�Z dBd#d$�Z!d%d&� Z"d'd(� Z#d)d*� Z$d+d,� Z%d-d.� Z&d/d0� Z'd1d2� Z(dCd4d5�Z)d6d7� Z*d8d9� Z+d:d;� Z,d<d=� Z-G d>d?� d?e�Z.dS )Da� ================================================== Laguerre Series (:mod:`numpy.polynomial.laguerre`) ================================================== This module provides a number of objects (mostly functions) useful for dealing with Laguerre series, including a `Laguerre` class that encapsulates the usual arithmetic operations. (General information on how this module represents and works with such polynomials is in the docstring for its "parent" sub-package, `numpy.polynomial`). Classes ------- .. autosummary:: :toctree: generated/ Laguerre Constants --------- .. autosummary:: :toctree: generated/ lagdomain lagzero lagone lagx Arithmetic ---------- .. autosummary:: :toctree: generated/ lagadd lagsub lagmulx lagmul lagdiv lagpow lagval lagval2d lagval3d laggrid2d laggrid3d Calculus -------- .. autosummary:: :toctree: generated/ lagder lagint Misc Functions -------------- .. autosummary:: :toctree: generated/ lagfromroots lagroots lagvander lagvander2d lagvander3d laggauss lagweight lagcompanion lagfit lagtrim lagline lag2poly poly2lag See also -------- `numpy.polynomial` � N)�normalize_axis_index� )� polyutils)�ABCPolyBase)�lagzero�lagone�lagx� lagdomain�lagline�lagadd�lagsub�lagmulx�lagmul�lagdiv�lagpow�lagval�lagder�lagint�lag2poly�poly2lag�lagfromroots� lagvander�lagfit�lagtrim�lagroots�Laguerre�lagval2d�lagval3d� laggrid2d� laggrid3d�lagvander2d�lagvander3d�lagcompanion�laggauss� lagweightc C s8 t �| g�\} d}| ddd� D ] }tt|�|�}q|S )a� poly2lag(pol) Convert a polynomial to a Laguerre series. Convert an array representing the coefficients of a polynomial (relative to the "standard" basis) ordered from lowest degree to highest, to an array of the coefficients of the equivalent Laguerre series, ordered from lowest to highest degree. Parameters ---------- pol : array_like 1-D array containing the polynomial coefficients Returns ------- c : ndarray 1-D array containing the coefficients of the equivalent Laguerre series. See Also -------- lag2poly Notes ----- The easy way to do conversions between polynomial basis sets is to use the convert method of a class instance. Examples -------- >>> from numpy.polynomial.laguerre import poly2lag >>> poly2lag(np.arange(4)) array([ 23., -63., 58., -18.]) r N���)�pu� as_seriesr r )�pol�res�p� r+ �;/usr/lib/python3/dist-packages/numpy/polynomial/laguerre.pyr ` s &r c C s� ddl m}m}m} t�| g�\} t| �}|dkr| S | d }| d }t|d dd�D ]%}|}|| |d ||d | �}|||d| d | ||��| �}q+||||||���S )a� Convert a Laguerre series to a polynomial. Convert an array representing the coefficients of a Laguerre series, ordered from lowest degree to highest, to an array of the coefficients of the equivalent polynomial (relative to the "standard" basis) ordered from lowest to highest degree. Parameters ---------- c : array_like 1-D array containing the Laguerre series coefficients, ordered from lowest order term to highest. Returns ------- pol : ndarray 1-D array containing the coefficients of the equivalent polynomial (relative to the "standard" basis) ordered from lowest order term to highest. See Also -------- poly2lag Notes ----- The easy way to do conversions between polynomial basis sets is to use the convert method of a class instance. Examples -------- >>> from numpy.polynomial.laguerre import lag2poly >>> lag2poly([ 23., -63., 58., -18.]) array([0., 1., 2., 3.]) r )�polyadd�polysub�polymulx���r% � )� polynomialr- r. r/ r&