A Chebyshev series class. The Chebyshev class provides the standard Python numerical methods '+', '-', '*', '//', '%', 'divmod', '**', and '()' as well as the methods listed below. Parameters ---------- coef : array_like Chebyshev coefficients in order of increasing
| 1993 | # |
| 1994 | |
| 1995 | class Chebyshev(ABCPolyBase): |
| 1996 | """A Chebyshev series class. |
| 1997 | |
| 1998 | The Chebyshev class provides the standard Python numerical methods |
| 1999 | '+', '-', '*', '//', '%', 'divmod', '**', and '()' as well as the |
| 2000 | methods listed below. |
| 2001 | |
| 2002 | Parameters |
| 2003 | ---------- |
| 2004 | coef : array_like |
| 2005 | Chebyshev coefficients in order of increasing degree, i.e., |
| 2006 | ``(1, 2, 3)`` gives ``1*T_0(x) + 2*T_1(x) + 3*T_2(x)``. |
| 2007 | domain : (2,) array_like, optional |
| 2008 | Domain to use. The interval ``[domain[0], domain[1]]`` is mapped |
| 2009 | to the interval ``[window[0], window[1]]`` by shifting and scaling. |
| 2010 | The default value is [-1, 1]. |
| 2011 | window : (2,) array_like, optional |
| 2012 | Window, see `domain` for its use. The default value is [-1, 1]. |
| 2013 | |
| 2014 | .. versionadded:: 1.6.0 |
| 2015 | symbol : str, optional |
| 2016 | Symbol used to represent the independent variable in string |
| 2017 | representations of the polynomial expression, e.g. for printing. |
| 2018 | The symbol must be a valid Python identifier. Default value is 'x'. |
| 2019 | |
| 2020 | .. versionadded:: 1.24 |
| 2021 | |
| 2022 | """ |
| 2023 | # Virtual Functions |
| 2024 | _add = staticmethod(chebadd) |
| 2025 | _sub = staticmethod(chebsub) |
| 2026 | _mul = staticmethod(chebmul) |
| 2027 | _div = staticmethod(chebdiv) |
| 2028 | _pow = staticmethod(chebpow) |
| 2029 | _val = staticmethod(chebval) |
| 2030 | _int = staticmethod(chebint) |
| 2031 | _der = staticmethod(chebder) |
| 2032 | _fit = staticmethod(chebfit) |
| 2033 | _line = staticmethod(chebline) |
| 2034 | _roots = staticmethod(chebroots) |
| 2035 | _fromroots = staticmethod(chebfromroots) |
| 2036 | |
| 2037 | @classmethod |
| 2038 | def interpolate(cls, func, deg, domain=None, args=()): |
| 2039 | """Interpolate a function at the Chebyshev points of the first kind. |
| 2040 | |
| 2041 | Returns the series that interpolates `func` at the Chebyshev points of |
| 2042 | the first kind scaled and shifted to the `domain`. The resulting series |
| 2043 | tends to a minmax approximation of `func` when the function is |
| 2044 | continuous in the domain. |
| 2045 | |
| 2046 | .. versionadded:: 1.14.0 |
| 2047 | |
| 2048 | Parameters |
| 2049 | ---------- |
| 2050 | func : function |
| 2051 | The function to be interpolated. It must be a function of a single |
| 2052 | variable of the form ``f(x, a, b, c...)``, where ``a, b, c...`` are |
no outgoing calls