hermite_e.pyc
1 o 2 [��c'� � @ sv d Z ddlZddlmZ ddlmZ ddlm Z 3 ddlmZ g d�Z e 4 jZdd � Zd 5 d� Ze�ddg�Ze�dg�Ze�dg�Ze�ddg�Zd d� Zdd� Zdd� Zdd� Zdd� Zdd� Zdd� ZdBdd�ZdCdd�Zdg dddfd d!�Z dDd#d$�Z!d%d&� Z"d'd(� Z#d)d*� Z$d+d,� Z%d-d.� Z&d/d0� Z'd1d2� Z(dEd4d5�Z)d6d7� Z*d8d9� Z+d:d;� Z,d<d=� Z-d>d?� Z.G d@dA� dAe�Z/dS )Fa. 6 =================================================================== 7 HermiteE Series, "Probabilists" (:mod:`numpy.polynomial.hermite_e`) 8 =================================================================== 9 10 This module provides a number of objects (mostly functions) useful for 11 dealing with Hermite_e series, including a `HermiteE` class that 12 encapsulates the usual arithmetic operations. (General information 13 on how this module represents and works with such polynomials is in the 14 docstring for its "parent" sub-package, `numpy.polynomial`). 15 16 Classes 17 ------- 18 .. autosummary:: 19 :toctree: generated/ 20 21 HermiteE 22 23 Constants 24 --------- 25 .. autosummary:: 26 :toctree: generated/ 27 28 hermedomain 29 hermezero 30 hermeone 31 hermex 32 33 Arithmetic 34 ---------- 35 .. autosummary:: 36 :toctree: generated/ 37 38 hermeadd 39 hermesub 40 hermemulx 41 hermemul 42 hermediv 43 hermepow 44 hermeval 45 hermeval2d 46 hermeval3d 47 hermegrid2d 48 hermegrid3d 49 50 Calculus 51 -------- 52 .. autosummary:: 53 :toctree: generated/ 54 55 hermeder 56 hermeint 57 58 Misc Functions 59 -------------- 60 .. autosummary:: 61 :toctree: generated/ 62 63 hermefromroots 64 hermeroots 65 hermevander 66 hermevander2d 67 hermevander3d 68 hermegauss 69 hermeweight 70 hermecompanion 71 hermefit 72 hermetrim 73 hermeline 74 herme2poly 75 poly2herme 76 77 See also 78 -------- 79 `numpy.polynomial` 80 81 � N)�normalize_axis_index� )� polyutils)�ABCPolyBase)� hermezero�hermeone�hermex�hermedomain� hermeline�hermeadd�hermesub� hermemulx�hermemul�hermediv�hermepow�hermeval�hermeder�hermeint� 82 herme2poly� 83 poly2herme�hermefromroots�hermevander�hermefit� hermetrim� 84 hermeroots�HermiteE� 85 hermeval2d� 86 hermeval3d�hermegrid2d�hermegrid3d� hermevander2d� hermevander3d�hermecompanion� 87 hermegauss�hermeweightc C sF t �| g�\} t| �d }d}t|dd�D ]}tt|�| | �}q|S )a� 88 poly2herme(pol) 89 90 Convert a polynomial to a Hermite series. 91 92 Convert an array representing the coefficients of a polynomial (relative 93 to the "standard" basis) ordered from lowest degree to highest, to an 94 array of the coefficients of the equivalent Hermite series, ordered 95 from lowest to highest degree. 96 97 Parameters 98 ---------- 99 pol : array_like 100 1-D array containing the polynomial coefficients 101 102 Returns 103 ------- 104 c : ndarray 105 1-D array containing the coefficients of the equivalent Hermite 106 series. 107 108 See Also 109 -------- 110 herme2poly 111 112 Notes 113 ----- 114 The easy way to do conversions between polynomial basis sets 115 is to use the convert method of a class instance. 116 117 Examples 118 -------- 119 >>> from numpy.polynomial.hermite_e import poly2herme 120 >>> poly2herme(np.arange(4)) 121 array([ 2., 10., 2., 3.]) 122 123 r r �����)�pu� as_series�len�ranger r )�pol�deg�res�i� r. ��C:\Users\Jacks.GUTTSPC\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\numpy\polynomial\hermite_e.pyr a s &r c C s� ddl m}m}m} t�| g�\} t| �}|dkr| S |dkr!| S | d }| d }t|d dd�D ]}|}|| |d ||d �}||||��}q1||||��S )a 124 Convert a Hermite series to a polynomial. 125 126 Convert an array representing the coefficients of a Hermite series, 127 ordered from lowest degree to highest, to an array of the coefficients 128 of the equivalent polynomial (relative to the "standard" basis) ordered 129 from lowest to highest degree. 130 131 Parameters 132 ---------- 133 c : array_like 134 1-D array containing the Hermite series coefficients, ordered 135 from lowest order term to highest. 136 137 Returns 138 ------- 139 pol : ndarray 140 1-D array containing the coefficients of the equivalent polynomial 141 (relative to the "standard" basis) ordered from lowest order term 142 to highest. 143 144 See Also 145 -------- 146 poly2herme 147 148 Notes 149 ----- 150 The easy way to do conversions between polynomial basis sets 151 is to use the convert method of a class instance. 152 153 Examples 154 -------- 155 >>> from numpy.polynomial.hermite_e import herme2poly 156 >>> herme2poly([ 2., 10., 2., 3.]) 157 array([0., 1., 2., 3.]) 158 159 r )�polyadd�polysub�polymulx� �����r% )� 160 polynomialr0 r1 r2 r&