neulab/docprompting-conala huggingface dataset:
numpy.polynomial.hermite_e.HermiteE.identity method   classmethod polynomial.hermite_e.HermiteE.identity(domain=None, window=None)[source]
 
Identity function. If p is the returned series, then p(x) == x for all values of x.  Parameters 
 
domain{None, array_like}, optional


If given, the array must be of the form [beg, end], where beg and end are the endpoints of the domain. If None is given then the class domain is used. The default is None.  
window{None, array_like}, optional


If given, the resulting array must be if the form [beg, end], where beg and end are the endpoints of the window. If None is given then the class window is used. The default is None.    Returns 
 
new_seriesseries


Series of representing the identity.
numpy.polynomial.hermite_e.HermiteE.integ method   polynomial.hermite_e.HermiteE.integ(m=1, k=[], lbnd=None)[source]
 
Integrate. Return a series instance that is the definite integral of the current series.  Parameters 
 
mnon-negative int


The number of integrations to perform.  
karray_like


Integration constants. The first constant is applied to the first integration, the second to the second, and so on. The list of values must less than or equal to m in length and any missing values are set to zero.  
lbndScalar


The lower bound of the definite integral.    Returns 
 
new_seriesseries


A new series representing the integral. The domain is the same as the domain of the integrated series.
numpy.polynomial.hermite_e.HermiteE.linspace method   polynomial.hermite_e.HermiteE.linspace(n=100, domain=None)[source]
 
Return x, y values at equally spaced points in domain. Returns the x, y values at n linearly spaced points across the domain. Here y is the value of the polynomial at the points x. By default the domain is the same as that of the series instance. This method is intended mostly as a plotting aid.  New in version 1.5.0.   Parameters 
 
nint, optional


Number of point pairs to return. The default value is 100.  
domain{None, array_like}, optional


If not None, the specified domain is used instead of that of the calling instance. It should be of the form [beg,end]. The default is None which case the class domain is used.    Returns 
 
x, yndarray


x is equal to linspace(self.domain[0], self.domain[1], n) and y is the series evaluated at element of x.
numpy.polynomial.hermite_e.HermiteE.mapparms method   polynomial.hermite_e.HermiteE.mapparms()[source]
 
Return the mapping parameters. The returned values define a linear map off + scl*x that is applied to the input arguments before the series is evaluated. The map depends on the domain and window; if the current domain is equal to the window the resulting map is the identity. If the coefficients of the series instance are to be used by themselves outside this class, then the linear function must be substituted for the x in the standard representation of the base polynomials.  Returns 
 
off, sclfloat or complex


The mapping function is defined by off + scl*x.     Notes If the current domain is the interval [l1, r1] and the window is [l2, r2], then the linear mapping function L is defined by the equations: L(l1) = l2
L(r1) = r2
numpy.polynomial.hermite_e.HermiteE.roots method   polynomial.hermite_e.HermiteE.roots()[source]
 
Return the roots of the series polynomial. Compute the roots for the series. Note that the accuracy of the roots decrease the further outside the domain they lie.  Returns 
 
rootsndarray


Array containing the roots of the series.
numpy.polynomial.hermite_e.HermiteE.trim method   polynomial.hermite_e.HermiteE.trim(tol=0)[source]
 
Remove trailing coefficients Remove trailing coefficients until a coefficient is reached whose absolute value greater than tol or the beginning of the series is reached. If all the coefficients would be removed the series is set to [0]. A new series instance is returned with the new coefficients. The current instance remains unchanged.  Parameters 
 
tolnon-negative number.


All trailing coefficients less than tol will be removed.    Returns 
 
new_seriesseries


New instance of series with trimmed coefficients.
numpy.polynomial.hermite_e.HermiteE.truncate method   polynomial.hermite_e.HermiteE.truncate(size)[source]
 
Truncate series to length size. Reduce the series to length size by discarding the high degree terms. The value of size must be a positive integer. This can be useful in least squares where the coefficients of the high degree terms may be very small.  Parameters 
 
sizepositive int


The series is reduced to length size by discarding the high degree terms. The value of size must be a positive integer.    Returns 
 
new_seriesseries


New instance of series with truncated coefficients.
numpy.polynomial.hermite_e.poly2herme   polynomial.hermite_e.poly2herme(pol)[source]
 
Convert a polynomial to a Hermite series. Convert an array representing the coefficients of a polynomial (relative to the “standard” basis) ordered from lowest degree to highest, to an array of the coefficients of the equivalent Hermite series, ordered from lowest to highest degree.  Parameters 
 
polarray_like


1-D array containing the polynomial coefficients    Returns 
 
cndarray


1-D array containing the coefficients of the equivalent Hermite series.      See also  herme2poly
  Notes The easy way to do conversions between polynomial basis sets is to use the convert method of a class instance. Examples >>> from numpy.polynomial.hermite_e import poly2herme
>>> poly2herme(np.arange(4))
array([  2.,  10.,   2.,   3.])
numpy.polynomial.laguerre.lag2poly   polynomial.laguerre.lag2poly(c)[source]
 
Convert a Laguerre series to a polynomial. Convert an array representing the coefficients of a Laguerre series, ordered from lowest degree to highest, to an array of the coefficients of the equivalent polynomial (relative to the “standard” basis) ordered from lowest to highest degree.  Parameters 
 
carray_like


1-D array containing the Laguerre series coefficients, ordered from lowest order term to highest.    Returns 
 
polndarray


1-D array containing the coefficients of the equivalent polynomial (relative to the “standard” basis) ordered from lowest order term to highest.      See also  poly2lag
  Notes The easy way to do conversions between polynomial basis sets is to use the convert method of a class instance. Examples >>> from numpy.polynomial.laguerre import lag2poly
>>> lag2poly([ 23., -63.,  58., -18.])
array([0., 1., 2., 3.])
numpy.polynomial.laguerre.lagadd   polynomial.laguerre.lagadd(c1, c2)[source]
 
Add one Laguerre series to another. Returns the sum of two Laguerre series c1 + c2. The arguments are sequences of coefficients ordered from lowest order term to highest, i.e., [1,2,3] represents the series P_0 + 2*P_1 + 3*P_2.  Parameters 
 
c1, c2array_like


1-D arrays of Laguerre series coefficients ordered from low to high.    Returns 
 
outndarray


Array representing the Laguerre series of their sum.      See also  
lagsub, lagmulx, lagmul, lagdiv, lagpow

  Notes Unlike multiplication, division, etc., the sum of two Laguerre series is a Laguerre series (without having to “reproject” the result onto the basis set) so addition, just like that of “standard” polynomials, is simply “component-wise.” Examples >>> from numpy.polynomial.laguerre import lagadd
>>> lagadd([1, 2, 3], [1, 2, 3, 4])
array([2.,  4.,  6.,  4.])
numpy.polynomial.laguerre.lagcompanion   polynomial.laguerre.lagcompanion(c)[source]
 
Return the companion matrix of c. The usual companion matrix of the Laguerre polynomials is already symmetric when c is a basis Laguerre polynomial, so no scaling is applied.  Parameters 
 
carray_like


1-D array of Laguerre series coefficients ordered from low to high degree.    Returns 
 
matndarray


Companion matrix of dimensions (deg, deg).     Notes  New in version 1.7.0.
numpy.polynomial.laguerre.lagder   polynomial.laguerre.lagder(c, m=1, scl=1, axis=0)[source]
 
Differentiate a Laguerre series. Returns the Laguerre series coefficients c differentiated m times along axis. At each iteration the result is multiplied by scl (the scaling factor is for use in a linear change of variable). The argument c is an array of coefficients from low to high degree along each axis, e.g., [1,2,3] represents the series 1*L_0 + 2*L_1 + 3*L_2 while [[1,2],[1,2]] represents 1*L_0(x)*L_0(y) + 1*L_1(x)*L_0(y) +
2*L_0(x)*L_1(y) + 2*L_1(x)*L_1(y) if axis=0 is x and axis=1 is y.  Parameters 
 
carray_like


Array of Laguerre series coefficients. If c is multidimensional the different axis correspond to different variables with the degree in each axis given by the corresponding index.  
mint, optional


Number of derivatives taken, must be non-negative. (Default: 1)  
sclscalar, optional


Each differentiation is multiplied by scl. The end result is multiplication by scl**m. This is for use in a linear change of variable. (Default: 1)  
axisint, optional


Axis over which the derivative is taken. (Default: 0).  New in version 1.7.0.     Returns 
 
derndarray


Laguerre series of the derivative.      See also  lagint
  Notes In general, the result of differentiating a Laguerre series does not resemble the same operation on a power series. Thus the result of this function may be “unintuitive,” albeit correct; see Examples section below. Examples >>> from numpy.polynomial.laguerre import lagder
>>> lagder([ 1.,  1.,  1., -3.])
array([1.,  2.,  3.])
>>> lagder([ 1.,  0.,  0., -4.,  3.], m=2)
array([1.,  2.,  3.])
numpy.polynomial.laguerre.lagdiv   polynomial.laguerre.lagdiv(c1, c2)[source]
 
Divide one Laguerre series by another. Returns the quotient-with-remainder of two Laguerre series c1 / c2. The arguments are sequences of coefficients from lowest order “term” to highest, e.g., [1,2,3] represents the series P_0 + 2*P_1 + 3*P_2.  Parameters 
 
c1, c2array_like


1-D arrays of Laguerre series coefficients ordered from low to high.    Returns 
 
[quo, rem]ndarrays


Of Laguerre series coefficients representing the quotient and remainder.      See also  
lagadd, lagsub, lagmulx, lagmul, lagpow

  Notes In general, the (polynomial) division of one Laguerre series by another results in quotient and remainder terms that are not in the Laguerre polynomial basis set. Thus, to express these results as a Laguerre series, it is necessary to “reproject” the results onto the Laguerre basis set, which may produce “unintuitive” (but correct) results; see Examples section below. Examples >>> from numpy.polynomial.laguerre import lagdiv
>>> lagdiv([  8., -13.,  38., -51.,  36.], [0, 1, 2])
(array([1., 2., 3.]), array([0.]))
>>> lagdiv([  9., -12.,  38., -51.,  36.], [0, 1, 2])
(array([1., 2., 3.]), array([1., 1.]))
numpy.polynomial.laguerre.lagfromroots   polynomial.laguerre.lagfromroots(roots)[source]
 
Generate a Laguerre series with given roots. The function returns the coefficients of the polynomial  \[p(x) = (x - r_0) * (x - r_1) * ... * (x - r_n),\] in Laguerre form, where the r_n are the roots specified in roots. If a zero has multiplicity n, then it must appear in roots n times. For instance, if 2 is a root of multiplicity three and 3 is a root of multiplicity 2, then roots looks something like [2, 2, 2, 3, 3]. The roots can appear in any order. If the returned coefficients are c, then  \[p(x) = c_0 + c_1 * L_1(x) + ... + c_n * L_n(x)\] The coefficient of the last term is not generally 1 for monic polynomials in Laguerre form.  Parameters 
 
rootsarray_like


Sequence containing the roots.    Returns 
 
outndarray


1-D array of coefficients. If all roots are real then out is a real array, if some of the roots are complex, then out is complex even if all the coefficients in the result are real (see Examples below).      See also  numpy.polynomial.polynomial.polyfromroots
numpy.polynomial.legendre.legfromroots
numpy.polynomial.chebyshev.chebfromroots
numpy.polynomial.hermite.hermfromroots
numpy.polynomial.hermite_e.hermefromroots
  Examples >>> from numpy.polynomial.laguerre import lagfromroots, lagval
>>> coef = lagfromroots((-1, 0, 1))
>>> lagval((-1, 0, 1), coef)
array([0.,  0.,  0.])
>>> coef = lagfromroots((-1j, 1j))
>>> lagval((-1j, 1j), coef)
array([0.+0.j, 0.+0.j])
numpy.polynomial.laguerre.laggauss   polynomial.laguerre.laggauss(deg)[source]
 
Gauss-Laguerre quadrature. Computes the sample points and weights for Gauss-Laguerre quadrature. These sample points and weights will correctly integrate polynomials of degree \(2*deg - 1\) or less over the interval \([0, \inf]\) with the weight function \(f(x) = \exp(-x)\).  Parameters 
 
degint


Number of sample points and weights. It must be >= 1.    Returns 
 
xndarray


1-D ndarray containing the sample points.  
yndarray


1-D ndarray containing the weights.     Notes  New in version 1.7.0.  The results have only been tested up to degree 100 higher degrees may be problematic. The weights are determined by using the fact that  \[w_k = c / (L'_n(x_k) * L_{n-1}(x_k))\] where \(c\) is a constant independent of \(k\) and \(x_k\) is the k’th root of \(L_n\), and then scaling the results to get the right value when integrating 1.
numpy.polynomial.laguerre.laggrid2d   polynomial.laguerre.laggrid2d(x, y, c)[source]
 
Evaluate a 2-D Laguerre series on the Cartesian product of x and y. This function returns the values:  \[p(a,b) = \sum_{i,j} c_{i,j} * L_i(a) * L_j(b)\] where the points (a, b) consist of all pairs formed by taking a from x and b from y. The resulting points form a grid with x in the first dimension and y in the second. The parameters x and y are converted to arrays only if they are tuples or a lists, otherwise they are treated as a scalars. In either case, either x and y or their elements must support multiplication and addition both with themselves and with the elements of c. If c has fewer than two dimensions, ones are implicitly appended to its shape to make it 2-D. The shape of the result will be c.shape[2:] + x.shape + y.shape.  Parameters 
 
x, yarray_like, compatible objects


The two dimensional series is evaluated at the points in the Cartesian product of x and y. If x or y is a list or tuple, it is first converted to an ndarray, otherwise it is left unchanged and, if it isn’t an ndarray, it is treated as a scalar.  
carray_like


Array of coefficients ordered so that the coefficient of the term of multi-degree i,j is contained in c[i,j]. If c has dimension greater than two the remaining indices enumerate multiple sets of coefficients.    Returns 
 
valuesndarray, compatible object


The values of the two dimensional Chebyshev series at points in the Cartesian product of x and y.      See also  
lagval, lagval2d, lagval3d, laggrid3d

  Notes  New in version 1.7.0.
numpy.polynomial.laguerre.laggrid3d   polynomial.laguerre.laggrid3d(x, y, z, c)[source]
 
Evaluate a 3-D Laguerre series on the Cartesian product of x, y, and z. This function returns the values:  \[p(a,b,c) = \sum_{i,j,k} c_{i,j,k} * L_i(a) * L_j(b) * L_k(c)\] where the points (a, b, c) consist of all triples formed by taking a from x, b from y, and c from z. The resulting points form a grid with x in the first dimension, y in the second, and z in the third. The parameters x, y, and z are converted to arrays only if they are tuples or a lists, otherwise they are treated as a scalars. In either case, either x, y, and z or their elements must support multiplication and addition both with themselves and with the elements of c. If c has fewer than three dimensions, ones are implicitly appended to its shape to make it 3-D. The shape of the result will be c.shape[3:] + x.shape + y.shape + z.shape.  Parameters 
 
x, y, zarray_like, compatible objects


The three dimensional series is evaluated at the points in the Cartesian product of x, y, and z. If x,`y`, or z is a list or tuple, it is first converted to an ndarray, otherwise it is left unchanged and, if it isn’t an ndarray, it is treated as a scalar.  
carray_like


Array of coefficients ordered so that the coefficients for terms of degree i,j are contained in c[i,j]. If c has dimension greater than two the remaining indices enumerate multiple sets of coefficients.    Returns 
 
valuesndarray, compatible object


The values of the two dimensional polynomial at points in the Cartesian product of x and y.      See also  
lagval, lagval2d, laggrid2d, lagval3d

  Notes  New in version 1.7.0.
numpy.polynomial.laguerre.lagint   polynomial.laguerre.lagint(c, m=1, k=[], lbnd=0, scl=1, axis=0)[source]
 
Integrate a Laguerre series. Returns the Laguerre 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 change of variable. (“Buyer beware”: note that, depending on what one is doing, one may want scl to be the reciprocal of what one might expect; for more information, see the Notes section below.) The argument c is an array of coefficients from low to high degree along each axis, e.g., [1,2,3] represents the series L_0 + 2*L_1 + 3*L_2 while [[1,2],[1,2]] represents 1*L_0(x)*L_0(y) + 1*L_1(x)*L_0(y) + 2*L_0(x)*L_1(y) +
2*L_1(x)*L_1(y) if axis=0 is x and axis=1 is y.  Parameters 
 
carray_like


Array of Laguerre series coefficients. If c is multidimensional the different axis correspond to different variables with the degree in each axis given by the corresponding index.  
mint, optional


Order of integration, must be positive. (Default: 1)  
k{[], list, scalar}, optional


Integration constant(s). The value of the first integral at lbnd is the first value in the list, the value of the second integral at lbnd is the second value, etc. If k == [] (the default), all constants are set to zero. If m == 1, a single scalar can be given instead of a list.  
lbndscalar, optional


The lower bound of the integral. (Default: 0)  
sclscalar, optional


Following each integration the result is multiplied by scl before the integration constant is added. (Default: 1)  
axisint, optional


Axis over which the integral is taken. (Default: 0).  New in version 1.7.0.     Returns 
 
Sndarray


Laguerre series coefficients of the integral.    Raises 
 ValueError

If m < 0, len(k) > m, np.ndim(lbnd) != 0, or np.ndim(scl) != 0.      See also  lagder
  Notes Note that the result of each integration is multiplied by scl. Why is this important to note? Say one is making a linear change of variable \(u = ax + b\) in an integral relative to x. Then \(dx = du/a\), so one will need to set scl equal to \(1/a\) - perhaps not what one would have first thought. Also note that, in general, the result of integrating a C-series needs to be “reprojected” onto the C-series basis set. Thus, typically, the result of this function is “unintuitive,” albeit correct; see Examples section below. Examples >>> from numpy.polynomial.laguerre import lagint
>>> lagint([1,2,3])
array([ 1.,  1.,  1., -3.])
>>> lagint([1,2,3], m=2)
array([ 1.,  0.,  0., -4.,  3.])
>>> lagint([1,2,3], k=1)
array([ 2.,  1.,  1., -3.])
>>> lagint([1,2,3], lbnd=-1)
array([11.5,  1. ,  1. , -3. ])
>>> lagint([1,2], m=2, k=[1,2], lbnd=-1)
array([ 11.16666667,  -5.        ,  -3.        ,   2.        ]) # may vary
numpy.polynomial.laguerre.lagline   polynomial.laguerre.lagline(off, scl)[source]
 
Laguerre series whose graph is a straight line.  Parameters 
 
off, sclscalars


The specified line is given by off + scl*x.    Returns 
 
yndarray


This module’s representation of the Laguerre series for off + scl*x.      See also  numpy.polynomial.polynomial.polyline
numpy.polynomial.chebyshev.chebline
numpy.polynomial.legendre.legline
numpy.polynomial.hermite.hermline
numpy.polynomial.hermite_e.hermeline
  Examples >>> from numpy.polynomial.laguerre import lagline, lagval
>>> lagval(0,lagline(3, 2))
3.0
>>> lagval(1,lagline(3, 2))
5.0
numpy.polynomial.laguerre.lagmul   polynomial.laguerre.lagmul(c1, c2)[source]
 
Multiply one Laguerre series by another. Returns the product of two Laguerre series c1 * c2. The arguments are sequences of coefficients, from lowest order “term” to highest, e.g., [1,2,3] represents the series P_0 + 2*P_1 + 3*P_2.  Parameters 
 
c1, c2array_like


1-D arrays of Laguerre series coefficients ordered from low to high.    Returns 
 
outndarray


Of Laguerre series coefficients representing their product.      See also  
lagadd, lagsub, lagmulx, lagdiv, lagpow

  Notes In general, the (polynomial) product of two C-series results in terms that are not in the Laguerre polynomial basis set. Thus, to express the product as a Laguerre series, it is necessary to “reproject” the product onto said basis set, which may produce “unintuitive” (but correct) results; see Examples section below. Examples >>> from numpy.polynomial.laguerre import lagmul
>>> lagmul([1, 2, 3], [0, 1, 2])
array([  8., -13.,  38., -51.,  36.])
numpy.polynomial.laguerre.lagmulx   polynomial.laguerre.lagmulx(c)[source]
 
Multiply a Laguerre series by x. Multiply the Laguerre series c by x, where x is the independent variable.  Parameters 
 
carray_like


1-D array of Laguerre series coefficients ordered from low to high.    Returns 
 
outndarray


Array representing the result of the multiplication.      See also  
lagadd, lagsub, lagmul, lagdiv, lagpow

  Notes The multiplication uses the recursion relationship for Laguerre polynomials in the form  \[xP_i(x) = (-(i + 1)*P_{i + 1}(x) + (2i + 1)P_{i}(x) - iP_{i - 1}(x))\] Examples >>> from numpy.polynomial.laguerre import lagmulx
>>> lagmulx([1, 2, 3])
array([-1.,  -1.,  11.,  -9.])
numpy.polynomial.laguerre.lagpow   polynomial.laguerre.lagpow(c, pow, maxpower=16)[source]
 
Raise a Laguerre series to a power. Returns the Laguerre series c raised to the power pow. The argument c is a sequence of coefficients ordered from low to high. i.e., [1,2,3] is the series P_0 + 2*P_1 + 3*P_2.  Parameters 
 
carray_like


1-D array of Laguerre series coefficients ordered from low to high.  
powinteger


Power to which the series will be raised  
maxpowerinteger, optional


Maximum power allowed. This is mainly to limit growth of the series to unmanageable size. Default is 16    Returns 
 
coefndarray


Laguerre series of power.      See also  
lagadd, lagsub, lagmulx, lagmul, lagdiv

  Examples >>> from numpy.polynomial.laguerre import lagpow
>>> lagpow([1, 2, 3], 2)
array([ 14., -16.,  56., -72.,  54.])
numpy.polynomial.laguerre.lagroots   polynomial.laguerre.lagroots(c)[source]
 
Compute the roots of a Laguerre series. Return the roots (a.k.a. “zeros”) of the polynomial  \[p(x) = \sum_i c[i] * L_i(x).\]  Parameters 
 
c1-D array_like


1-D array of coefficients.    Returns 
 
outndarray


Array of the roots of the series. If all the roots are real, then out is also real, otherwise it is complex.      See also  numpy.polynomial.polynomial.polyroots
numpy.polynomial.legendre.legroots
numpy.polynomial.chebyshev.chebroots
numpy.polynomial.hermite.hermroots
numpy.polynomial.hermite_e.hermeroots
  Notes The root estimates are obtained as the eigenvalues of the companion matrix, Roots far from the origin of the complex plane may have large errors due to the numerical instability of the series for such values. Roots with multiplicity greater than 1 will also show larger errors as the value of the series near such points is relatively insensitive to errors in the roots. Isolated roots near the origin can be improved by a few iterations of Newton’s method. The Laguerre series basis polynomials aren’t powers of x so the results of this function may seem unintuitive. Examples >>> from numpy.polynomial.laguerre import lagroots, lagfromroots
>>> coef = lagfromroots([0, 1, 2])
>>> coef
array([  2.,  -8.,  12.,  -6.])
>>> lagroots(coef)
array([-4.4408921e-16,  1.0000000e+00,  2.0000000e+00])