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

Function hermeint

numpy/polynomial/hermite_e.py:673–792  ·  view source on GitHub ↗

Integrate a Hermite_e series. Returns the Hermite_e 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

671
672
673def hermeint(c, m=1, k=[], lbnd=0, scl=1, axis=0):
674 """
675 Integrate a Hermite_e series.
676
677 Returns the Hermite_e series coefficients `c` integrated `m` times from
678 `lbnd` along `axis`. At each iteration the resulting series is
679 **multiplied** by `scl` and an integration constant, `k`, is added.
680 The scaling factor is for use in a linear change of variable. ("Buyer
681 beware": note that, depending on what one is doing, one may want `scl`
682 to be the reciprocal of what one might expect; for more information,
683 see the Notes section below.) The argument `c` is an array of
684 coefficients from low to high degree along each axis, e.g., [1,2,3]
685 represents the series ``H_0 + 2*H_1 + 3*H_2`` while [[1,2],[1,2]]
686 represents ``1*H_0(x)*H_0(y) + 1*H_1(x)*H_0(y) + 2*H_0(x)*H_1(y) +
687 2*H_1(x)*H_1(y)`` if axis=0 is ``x`` and axis=1 is ``y``.
688
689 Parameters
690 ----------
691 c : array_like
692 Array of Hermite_e series coefficients. If c is multidimensional
693 the different axis correspond to different variables with the
694 degree in each axis given by the corresponding index.
695 m : int, optional
696 Order of integration, must be positive. (Default: 1)
697 k : {[], list, scalar}, optional
698 Integration constant(s). The value of the first integral at
699 ``lbnd`` is the first value in the list, the value of the second
700 integral at ``lbnd`` is the second value, etc. If ``k == []`` (the
701 default), all constants are set to zero. If ``m == 1``, a single
702 scalar can be given instead of a list.
703 lbnd : scalar, optional
704 The lower bound of the integral. (Default: 0)
705 scl : scalar, optional
706 Following each integration the result is *multiplied* by `scl`
707 before the integration constant is added. (Default: 1)
708 axis : int, optional
709 Axis over which the integral is taken. (Default: 0).
710
711 .. versionadded:: 1.7.0
712
713 Returns
714 -------
715 S : ndarray
716 Hermite_e series coefficients of the integral.
717
718 Raises
719 ------
720 ValueError
721 If ``m < 0``, ``len(k) > m``, ``np.ndim(lbnd) != 0``, or
722 ``np.ndim(scl) != 0``.
723
724 See Also
725 --------
726 hermeder
727
728 Notes
729 -----
730 Note that the result of each integration is *multiplied* by `scl`.

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected