diff options
author | Jeffrey Yancey <jeffrey@octane5.com> | 2018-08-26 14:42:25 -0600 |
---|---|---|
committer | Jeffrey Yancey <jeffrey@octane5.com> | 2018-08-26 14:42:25 -0600 |
commit | d55a7752047527370320031c6a2957aa331fb82c (patch) | |
tree | 540b2af8c0ea70894a97d2298799d3549517c811 /numpy/polynomial/chebyshev.py | |
parent | 52c67eb9a213b9df87f98d6f1f70398e147de425 (diff) | |
download | numpy-d55a7752047527370320031c6a2957aa331fb82c.tar.gz |
DOC: add examples and extend exisiting dos for polynomial subclasses
Diffstat (limited to 'numpy/polynomial/chebyshev.py')
-rw-r--r-- | numpy/polynomial/chebyshev.py | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/numpy/polynomial/chebyshev.py b/numpy/polynomial/chebyshev.py index aa2b5b5ea..f14ed988d 100644 --- a/numpy/polynomial/chebyshev.py +++ b/numpy/polynomial/chebyshev.py @@ -21,9 +21,10 @@ Arithmetic ---------- - `chebadd` -- add two Chebyshev series. - `chebsub` -- subtract one Chebyshev series from another. +- `chebmulx` -- multiply a Chebyshev series in ``P_i(x)`` by ``x``. - `chebmul` -- multiply two Chebyshev series. - `chebdiv` -- divide one Chebyshev series by another. -- `chebpow` -- raise a Chebyshev series to an positive integer power +- `chebpow` -- raise a Chebyshev series to a positive integer power. - `chebval` -- evaluate a Chebyshev series at given points. - `chebval2d` -- evaluate a 2D Chebyshev series at given points. - `chebval3d` -- evaluate a 3D Chebyshev series at given points. @@ -579,7 +580,7 @@ def chebadd(c1, c2): See Also -------- - chebsub, chebmul, chebdiv, chebpow + chebsub, chebmulx, chebmul, chebdiv, chebpow Notes ----- @@ -629,7 +630,7 @@ def chebsub(c1, c2): See Also -------- - chebadd, chebmul, chebdiv, chebpow + chebadd, chebmulx, chebmul, chebdiv, chebpow Notes ----- @@ -684,6 +685,12 @@ def chebmulx(c): .. versionadded:: 1.5.0 + Examples + -------- + >>> from numpy.polynomial import chebyshev as C + >>> C.chebmulx([1,2,3]) + array([ 1., 2.5, 3., 1.5, 2.]) + """ # c is a trimmed copy [c] = pu.as_series([c]) @@ -722,7 +729,7 @@ def chebmul(c1, c2): See Also -------- - chebadd, chebsub, chebdiv, chebpow + chebadd, chebsub, chebmulx, chebdiv, chebpow Notes ----- @@ -773,7 +780,7 @@ def chebdiv(c1, c2): See Also -------- - chebadd, chebsub, chebmul, chebpow + chebadd, chebsub, chemulx, chebmul, chebpow Notes ----- @@ -841,10 +848,13 @@ def chebpow(c, pow, maxpower=16): See Also -------- - chebadd, chebsub, chebmul, chebdiv + chebadd, chebsub, chebmulx, chebmul, chebdiv Examples -------- + >>> from numpy.polynomial import chebyshev as C + >>> C.chebpow([1, 2, 3, 4], 2) + array([15.5, 22. , 16. , 14. , 12.5, 12. , 8. ]) """ # c is a trimmed copy |