6.5.1.1.2. statsmodels.sandbox.nonparametric.densityorthopoly.inner_cont¶
-
statsmodels.sandbox.nonparametric.densityorthopoly.
inner_cont
(polys, lower, upper, weight=None)[source]¶ inner product of continuous function (with weight=1)
Parameters: polys : list of callables
polynomial instances
lower : float
lower integration limit
upper : float
upper integration limit
weight : callable or None
weighting function
Returns: innp : ndarray
symmetric 2d square array with innerproduct of all function pairs
err : ndarray
numerical error estimate from scipy.integrate.quad, same dimension as innp
Examples
>>> from scipy.special import chebyt >>> polys = [chebyt(i) for i in range(4)] >>> r, e = inner_cont(polys, -1, 1) >>> r array([[ 2. , 0. , -0.66666667, 0. ], [ 0. , 0.66666667, 0. , -0.4 ], [-0.66666667, 0. , 0.93333333, 0. ], [ 0. , -0.4 , 0. , 0.97142857]])