MCPcopy Create free account
hub / github.com/numpy/numpy / chebint

Function chebint

numpy/polynomial/chebyshev.py:967–1091  ·  view source on GitHub ↗

Integrate a Chebyshev series. Returns the Chebyshev series coefficients `c` integrated `m` times from `lbnd` along `axis`. At each iteration the resulting series is **multiplied** by `scl` and an integration constant, `k`, is added. The scaling factor is for use in a linear cha

(c, m=1, k=[], lbnd=0, scl=1, axis=0)

Source from the content-addressed store, hash-verified

965
966
967def chebint(c, m=1, k=[], lbnd=0, scl=1, axis=0):
968 """
969 Integrate a Chebyshev series.
970
971 Returns the Chebyshev series coefficients `c` integrated `m` times from
972 `lbnd` along `axis`. At each iteration the resulting series is
973 **multiplied** by `scl` and an integration constant, `k`, is added.
974 The scaling factor is for use in a linear change of variable. ("Buyer
975 beware": note that, depending on what one is doing, one may want `scl`
976 to be the reciprocal of what one might expect; for more information,
977 see the Notes section below.) The argument `c` is an array of
978 coefficients from low to high degree along each axis, e.g., [1,2,3]
979 represents the series ``T_0 + 2*T_1 + 3*T_2`` while [[1,2],[1,2]]
980 represents ``1*T_0(x)*T_0(y) + 1*T_1(x)*T_0(y) + 2*T_0(x)*T_1(y) +
981 2*T_1(x)*T_1(y)`` if axis=0 is ``x`` and axis=1 is ``y``.
982
983 Parameters
984 ----------
985 c : array_like
986 Array of Chebyshev series coefficients. If c is multidimensional
987 the different axis correspond to different variables with the
988 degree in each axis given by the corresponding index.
989 m : int, optional
990 Order of integration, must be positive. (Default: 1)
991 k : {[], list, scalar}, optional
992 Integration constant(s). The value of the first integral at zero
993 is the first value in the list, the value of the second integral
994 at zero is the second value, etc. If ``k == []`` (the default),
995 all constants are set to zero. If ``m == 1``, a single scalar can
996 be given instead of a list.
997 lbnd : scalar, optional
998 The lower bound of the integral. (Default: 0)
999 scl : scalar, optional
1000 Following each integration the result is *multiplied* by `scl`
1001 before the integration constant is added. (Default: 1)
1002 axis : int, optional
1003 Axis over which the integral is taken. (Default: 0).
1004
1005 .. versionadded:: 1.7.0
1006
1007 Returns
1008 -------
1009 S : ndarray
1010 C-series coefficients of the integral.
1011
1012 Raises
1013 ------
1014 ValueError
1015 If ``m < 1``, ``len(k) > m``, ``np.ndim(lbnd) != 0``, or
1016 ``np.ndim(scl) != 0``.
1017
1018 See Also
1019 --------
1020 chebder
1021
1022 Notes
1023 -----
1024 Note that the result of each integration is *multiplied* by `scl`.

Callers

nothing calls this directly

Calls 5

normalize_axis_indexFunction · 0.90
chebvalFunction · 0.85
astypeMethod · 0.80
ndimMethod · 0.80
allMethod · 0.45

Tested by

no test coverage detected