chebyshev.pyc
1 o 2 [��cT� � @ s� d Z ddlZddlmZ ddlmZ ddlm Z 3 ddlmZ g d�Z e 4 jZdd � Zd 5 d� Zdd � Zdd� Zdd� Zdd� Zdd� Zdd� Ze�ddg�Ze�dg�Ze�dg�Ze�ddg�Zdd� Zdd� Zdd� Zdd � Z d!d"� Z!d#d$� Z"d%d&� Z#dSd(d)�Z$dTd*d+�Z%dg dddfd,d-�Z&dUd/d0�Z'd1d2� Z(d3d4� Z)d5d6� Z*d7d8� Z+d9d:� Z,d;d<� Z-d=d>� Z.dVd@dA�Z/dBdC� Z0dDdE� Z1dWdGdH�Z2dIdJ� Z3dKdL� Z4dMdN� Z5dOdP� Z6G dQdR� dRe�Z7dS )Xa� 6 ==================================================== 7 Chebyshev Series (:mod:`numpy.polynomial.chebyshev`) 8 ==================================================== 9 10 This module provides a number of objects (mostly functions) useful for 11 dealing with Chebyshev series, including a `Chebyshev` 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 19 .. autosummary:: 20 :toctree: generated/ 21 22 Chebyshev 23 24 25 Constants 26 --------- 27 28 .. autosummary:: 29 :toctree: generated/ 30 31 chebdomain 32 chebzero 33 chebone 34 chebx 35 36 Arithmetic 37 ---------- 38 39 .. autosummary:: 40 :toctree: generated/ 41 42 chebadd 43 chebsub 44 chebmulx 45 chebmul 46 chebdiv 47 chebpow 48 chebval 49 chebval2d 50 chebval3d 51 chebgrid2d 52 chebgrid3d 53 54 Calculus 55 -------- 56 57 .. autosummary:: 58 :toctree: generated/ 59 60 chebder 61 chebint 62 63 Misc Functions 64 -------------- 65 66 .. autosummary:: 67 :toctree: generated/ 68 69 chebfromroots 70 chebroots 71 chebvander 72 chebvander2d 73 chebvander3d 74 chebgauss 75 chebweight 76 chebcompanion 77 chebfit 78 chebpts1 79 chebpts2 80 chebtrim 81 chebline 82 cheb2poly 83 poly2cheb 84 chebinterpolate 85 86 See also 87 -------- 88 `numpy.polynomial` 89 90 Notes 91 ----- 92 The implementations of multiplication, division, integration, and 93 differentiation use the algebraic identities [1]_: 94 95 .. math:: 96 T_n(x) = \frac{z^n + z^{-n}}{2} \\ 97 z\frac{dx}{dz} = \frac{z - z^{-1}}{2}. 98 99 where 100 101 .. math:: x = \frac{z + z^{-1}}{2}. 102 103 These identities allow a Chebyshev series to be expressed as a finite, 104 symmetric Laurent series. In this module, this sort of Laurent series 105 is referred to as a "z-series." 106 107 References 108 ---------- 109 .. [1] A. T. Benjamin, et al., "Combinatorial Trigonometry with Chebyshev 110 Polynomials," *Journal of Statistical Planning and Inference 14*, 2008 111 (https://web.archive.org/web/20080221202153/https://www.math.hmc.edu/~benjamin/papers/CombTrig.pdf, pg. 4) 112 113 � N)�normalize_axis_index� )� polyutils)�ABCPolyBase)"�chebzero�chebone�chebx� 114 chebdomain�chebline�chebadd�chebsub�chebmulx�chebmul�chebdiv�chebpow�chebval�chebder�chebint� cheb2poly� poly2cheb� chebfromroots� 115 chebvander�chebfit�chebtrim� chebroots�chebpts1�chebpts2� Chebyshev� chebval2d� chebval3d� 116 chebgrid2d� 117 chebgrid3d�chebvander2d�chebvander3d� chebcompanion� chebgauss� 118 chebweight�chebinterpolatec C sD | j }tjd| d | jd�}| d ||d d�<