Evaluate a Hermite series.
If cs is of length n, this function returns :
p(x) = cs[0]*P_0(x) + cs[1]*P_1(x) + ... + cs[n-1]*P_{n-1}(x)
If x is a sequence or array then p(x) will have the same shape as x. If r is a ring_like object that supports multiplication and addition by the values in cs, then an object of the same type is returned.
Parameters : | x : array_like, ring_like
cs : array_like
|
---|---|
Returns : | values : ndarray, ring_like
|
See also
Notes
The evaluation uses Clenshaw recursion, aka synthetic division.
Examples
>>> from numpy.polynomial.hermite import hermval
>>> coef = [1,2,3]
>>> hermval(1, coef)
11.0
>>> hermval([[1,2],[3,4]], coef)
array([[ 11., 51.],
[ 115., 203.]])