neulab/docprompting-conala huggingface dataset:
numpy.polynomial.hermite_e.hermepow   polynomial.hermite_e.hermepow(c, pow, maxpower=16)[source]
 
Raise a Hermite series to a power. Returns the Hermite 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 Hermite 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


Hermite series of power.      See also  
hermeadd, hermesub, hermemulx, hermemul, hermediv

  Examples >>> from numpy.polynomial.hermite_e import hermepow
>>> hermepow([1, 2, 3], 2)
array([23.,  28.,  46.,  12.,   9.])
numpy.polynomial.hermite_e.hermeroots   polynomial.hermite_e.hermeroots(c)[source]
 
Compute the roots of a HermiteE series. Return the roots (a.k.a. “zeros”) of the polynomial  \[p(x) = \sum_i c[i] * He_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.laguerre.lagroots
numpy.polynomial.hermite.hermroots
numpy.polynomial.chebyshev.chebroots
  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 HermiteE series basis polynomials aren’t powers of x so the results of this function may seem unintuitive. Examples >>> from numpy.polynomial.hermite_e import hermeroots, hermefromroots
>>> coef = hermefromroots([-1, 0, 1])
>>> coef
array([0., 2., 0., 1.])
>>> hermeroots(coef)
array([-1.,  0.,  1.]) # may vary
numpy.polynomial.hermite_e.hermesub   polynomial.hermite_e.hermesub(c1, c2)[source]
 
Subtract one Hermite series from another. Returns the difference of two Hermite series c1 - c2. The sequences of coefficients are 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 Hermite series coefficients ordered from low to high.    Returns 
 
outndarray


Of Hermite series coefficients representing their difference.      See also  
hermeadd, hermemulx, hermemul, hermediv, hermepow

  Notes Unlike multiplication, division, etc., the difference of two Hermite series is a Hermite series (without having to “reproject” the result onto the basis set) so subtraction, just like that of “standard” polynomials, is simply “component-wise.” Examples >>> from numpy.polynomial.hermite_e import hermesub
>>> hermesub([1, 2, 3, 4], [1, 2, 3])
array([0., 0., 0., 4.])
numpy.polynomial.hermite_e.hermetrim   polynomial.hermite_e.hermetrim(c, tol=0)[source]
 
Remove “small” “trailing” coefficients from a polynomial. “Small” means “small in absolute value” and is controlled by the parameter tol; “trailing” means highest order coefficient(s), e.g., in [0, 1, 1, 0, 0] (which represents 0 + x + x**2 + 0*x**3 + 0*x**4) both the 3-rd and 4-th order coefficients would be “trimmed.”  Parameters 
 
carray_like


1-d array of coefficients, ordered from lowest order to highest.  
tolnumber, optional


Trailing (i.e., highest order) elements with absolute value less than or equal to tol (default value is zero) are removed.    Returns 
 
trimmedndarray


1-d array with trailing zeros removed. If the resulting series would be empty, a series containing a single zero is returned.    Raises 
 ValueError

If tol < 0      See also  trimseq
  Examples >>> from numpy.polynomial import polyutils as pu
>>> pu.trimcoef((0,0,3,0,5,0,0))
array([0.,  0.,  3.,  0.,  5.])
>>> pu.trimcoef((0,0,1e-3,0,1e-5,0,0),1e-3) # item == tol is trimmed
array([0.])
>>> i = complex(0,1) # works for complex
>>> pu.trimcoef((3e-4,1e-3*(1-i),5e-4,2e-5*(1+i)), 1e-3)
array([0.0003+0.j   , 0.001 -0.001j])
numpy.polynomial.hermite_e.hermeval   polynomial.hermite_e.hermeval(x, c, tensor=True)[source]
 
Evaluate an HermiteE series at points x. If c is of length n + 1, this function returns the value:  \[p(x) = c_0 * He_0(x) + c_1 * He_1(x) + ... + c_n * He_n(x)\] The parameter x is converted to an array only if it is a tuple or a list, otherwise it is treated as a scalar. In either case, either x or its elements must support multiplication and addition both with themselves and with the elements of c. If c is a 1-D array, then p(x) will have the same shape as x. If c is multidimensional, then the shape of the result depends on the value of tensor. If tensor is true the shape will be c.shape[1:] + x.shape. If tensor is false the shape will be c.shape[1:]. Note that scalars have shape (,). Trailing zeros in the coefficients will be used in the evaluation, so they should be avoided if efficiency is a concern.  Parameters 
 
xarray_like, compatible object


If x is a list or tuple, it is converted to an ndarray, otherwise it is left unchanged and treated as a scalar. In either case, x or its elements must support addition and multiplication with with themselves and with the elements of c.  
carray_like


Array of coefficients ordered so that the coefficients for terms of degree n are contained in c[n]. If c is multidimensional the remaining indices enumerate multiple polynomials. In the two dimensional case the coefficients may be thought of as stored in the columns of c.  
tensorboolean, optional


If True, the shape of the coefficient array is extended with ones on the right, one for each dimension of x. Scalars have dimension 0 for this action. The result is that every column of coefficients in c is evaluated for every element of x. If False, x is broadcast over the columns of c for the evaluation. This keyword is useful when c is multidimensional. The default value is True.  New in version 1.7.0.     Returns 
 
valuesndarray, algebra_like


The shape of the return value is described above.      See also  
hermeval2d, hermegrid2d, hermeval3d, hermegrid3d

  Notes The evaluation uses Clenshaw recursion, aka synthetic division. Examples >>> from numpy.polynomial.hermite_e import hermeval
>>> coef = [1,2,3]
>>> hermeval(1, coef)
3.0
>>> hermeval([[1,2],[3,4]], coef)
array([[ 3., 14.],
       [31., 54.]])
numpy.polynomial.hermite_e.hermeval2d   polynomial.hermite_e.hermeval2d(x, y, c)[source]
 
Evaluate a 2-D HermiteE series at points (x, y). This function returns the values:  \[p(x,y) = \sum_{i,j} c_{i,j} * He_i(x) * He_j(y)\] The parameters x and y are converted to arrays only if they are tuples or a lists, otherwise they are treated as a scalars and they must have the same shape after conversion. 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 is a 1-D array a one is implicitly appended to its shape to make it 2-D. The shape of the result will be c.shape[2:] + x.shape.  Parameters 
 
x, yarray_like, compatible objects


The two dimensional series is evaluated at the points (x, y), where x and y must have the same shape. 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 polynomial at points formed with pairs of corresponding values from x and y.      See also  
hermeval, hermegrid2d, hermeval3d, hermegrid3d

  Notes  New in version 1.7.0.
numpy.polynomial.hermite_e.hermeval3d   polynomial.hermite_e.hermeval3d(x, y, z, c)[source]
 
Evaluate a 3-D Hermite_e series at points (x, y, z). This function returns the values:  \[p(x,y,z) = \sum_{i,j,k} c_{i,j,k} * He_i(x) * He_j(y) * He_k(z)\] 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 and they must have the same shape after conversion. 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 3 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.  Parameters 
 
x, y, zarray_like, compatible object


The three dimensional series is evaluated at the points (x, y, z), where x, y, and z must have the same shape. If any of 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 coefficient of the term of multi-degree i,j,k is contained in c[i,j,k]. If c has dimension greater than 3 the remaining indices enumerate multiple sets of coefficients.    Returns 
 
valuesndarray, compatible object


The values of the multidimensional polynomial on points formed with triples of corresponding values from x, y, and z.      See also  
hermeval, hermeval2d, hermegrid2d, hermegrid3d

  Notes  New in version 1.7.0.
numpy.polynomial.hermite_e.hermevander   polynomial.hermite_e.hermevander(x, deg)[source]
 
Pseudo-Vandermonde matrix of given degree. Returns the pseudo-Vandermonde matrix of degree deg and sample points x. The pseudo-Vandermonde matrix is defined by  \[V[..., i] = He_i(x),\] where 0 <= i <= deg. The leading indices of V index the elements of x and the last index is the degree of the HermiteE polynomial. If c is a 1-D array of coefficients of length n + 1 and V is the array V = hermevander(x, n), then np.dot(V, c) and hermeval(x, c) are the same up to roundoff. This equivalence is useful both for least squares fitting and for the evaluation of a large number of HermiteE series of the same degree and sample points.  Parameters 
 
xarray_like


Array of points. The dtype is converted to float64 or complex128 depending on whether any of the elements are complex. If x is scalar it is converted to a 1-D array.  
degint


Degree of the resulting matrix.    Returns 
 
vanderndarray


The pseudo-Vandermonde matrix. The shape of the returned matrix is x.shape + (deg + 1,), where The last index is the degree of the corresponding HermiteE polynomial. The dtype will be the same as the converted x.     Examples >>> from numpy.polynomial.hermite_e import hermevander
>>> x = np.array([-1, 0, 1])
>>> hermevander(x, 3)
array([[ 1., -1.,  0.,  2.],
       [ 1.,  0., -1., -0.],
       [ 1.,  1.,  0., -2.]])
numpy.polynomial.hermite_e.hermevander2d   polynomial.hermite_e.hermevander2d(x, y, deg)[source]
 
Pseudo-Vandermonde matrix of given degrees. Returns the pseudo-Vandermonde matrix of degrees deg and sample points (x, y). The pseudo-Vandermonde matrix is defined by  \[V[..., (deg[1] + 1)*i + j] = He_i(x) * He_j(y),\] where 0 <= i <= deg[0] and 0 <= j <= deg[1]. The leading indices of V index the points (x, y) and the last index encodes the degrees of the HermiteE polynomials. If V = hermevander2d(x, y, [xdeg, ydeg]), then the columns of V correspond to the elements of a 2-D coefficient array c of shape (xdeg + 1, ydeg + 1) in the order  \[c_{00}, c_{01}, c_{02} ... , c_{10}, c_{11}, c_{12} ...\] and np.dot(V, c.flat) and hermeval2d(x, y, c) will be the same up to roundoff. This equivalence is useful both for least squares fitting and for the evaluation of a large number of 2-D HermiteE series of the same degrees and sample points.  Parameters 
 
x, yarray_like


Arrays of point coordinates, all of the same shape. The dtypes will be converted to either float64 or complex128 depending on whether any of the elements are complex. Scalars are converted to 1-D arrays.  
deglist of ints


List of maximum degrees of the form [x_deg, y_deg].    Returns 
 
vander2dndarray


The shape of the returned matrix is x.shape + (order,), where \(order = (deg[0]+1)*(deg[1]+1)\). The dtype will be the same as the converted x and y.      See also  
hermevander, hermevander3d, hermeval2d, hermeval3d

  Notes  New in version 1.7.0.
numpy.polynomial.hermite_e.hermevander3d   polynomial.hermite_e.hermevander3d(x, y, z, deg)[source]
 
Pseudo-Vandermonde matrix of given degrees. Returns the pseudo-Vandermonde matrix of degrees deg and sample points (x, y, z). If l, m, n are the given degrees in x, y, z, then Hehe pseudo-Vandermonde matrix is defined by  \[V[..., (m+1)(n+1)i + (n+1)j + k] = He_i(x)*He_j(y)*He_k(z),\] where 0 <= i <= l, 0 <= j <= m, and 0 <= j <= n. The leading indices of V index the points (x, y, z) and the last index encodes the degrees of the HermiteE polynomials. If V = hermevander3d(x, y, z, [xdeg, ydeg, zdeg]), then the columns of V correspond to the elements of a 3-D coefficient array c of shape (xdeg + 1, ydeg + 1, zdeg + 1) in the order  \[c_{000}, c_{001}, c_{002},... , c_{010}, c_{011}, c_{012},...\] and np.dot(V, c.flat) and hermeval3d(x, y, z, c) will be the same up to roundoff. This equivalence is useful both for least squares fitting and for the evaluation of a large number of 3-D HermiteE series of the same degrees and sample points.  Parameters 
 
x, y, zarray_like


Arrays of point coordinates, all of the same shape. The dtypes will be converted to either float64 or complex128 depending on whether any of the elements are complex. Scalars are converted to 1-D arrays.  
deglist of ints


List of maximum degrees of the form [x_deg, y_deg, z_deg].    Returns 
 
vander3dndarray


The shape of the returned matrix is x.shape + (order,), where \(order = (deg[0]+1)*(deg[1]+1)*(deg[2]+1)\). The dtype will be the same as the converted x, y, and z.      See also  
hermevander, hermevander3d, hermeval2d, hermeval3d

  Notes  New in version 1.7.0.
numpy.polynomial.hermite_e.hermeweight   polynomial.hermite_e.hermeweight(x)[source]
 
Weight function of the Hermite_e polynomials. The weight function is \(\exp(-x^2/2)\) and the interval of integration is \([-\inf, \inf]\). the HermiteE polynomials are orthogonal, but not normalized, with respect to this weight function.  Parameters 
 
xarray_like


Values at which the weight function will be computed.    Returns 
 
wndarray


The weight function at x.     Notes  New in version 1.7.0.
numpy.polynomial.hermite_e.HermiteE.__call__ method   polynomial.hermite_e.HermiteE.__call__(arg)[source]
 
Call self as a function.
numpy.polynomial.hermite_e.HermiteE.basis method   classmethod polynomial.hermite_e.HermiteE.basis(deg, domain=None, window=None)[source]
 
Series basis polynomial of degree deg. Returns the series representing the basis polynomial of degree deg.  New in version 1.7.0.   Parameters 
 
degint


Degree of the basis polynomial for the series. Must be >= 0.  
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


A series with the coefficient of the deg term set to one and all others zero.
numpy.polynomial.hermite_e.HermiteE.cast method   classmethod polynomial.hermite_e.HermiteE.cast(series, domain=None, window=None)[source]
 
Convert series to series of this class. The series is expected to be an instance of some polynomial series of one of the types supported by by the numpy.polynomial module, but could be some other class that supports the convert method.  New in version 1.7.0.   Parameters 
 
seriesseries


The series instance to be converted.  
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


A series of the same kind as the calling class and equal to series when evaluated.      See also  convert

similar instance method
numpy.polynomial.hermite_e.HermiteE.convert method   polynomial.hermite_e.HermiteE.convert(domain=None, kind=None, window=None)[source]
 
Convert series to a different kind and/or domain and/or window.  Parameters 
 
domainarray_like, optional


The domain of the converted series. If the value is None, the default domain of kind is used.  
kindclass, optional


The polynomial series type class to which the current instance should be converted. If kind is None, then the class of the current instance is used.  
windowarray_like, optional


The window of the converted series. If the value is None, the default window of kind is used.    Returns 
 
new_seriesseries


The returned class can be of different type than the current instance and/or have a different domain and/or different window.     Notes Conversion between domains and class types can result in numerically ill defined series.
numpy.polynomial.hermite_e.HermiteE.copy method   polynomial.hermite_e.HermiteE.copy()[source]
 
Return a copy.  Returns 
 
new_seriesseries


Copy of self.
numpy.polynomial.hermite_e.HermiteE.cutdeg method   polynomial.hermite_e.HermiteE.cutdeg(deg)[source]
 
Truncate series to the given degree. Reduce the degree of the series to deg by discarding the high order terms. If deg is greater than the current degree a copy of the current series is returned. This can be useful in least squares where the coefficients of the high degree terms may be very small.  New in version 1.5.0.   Parameters 
 
degnon-negative int


The series is reduced to degree deg by discarding the high order terms. The value of deg must be a non-negative integer.    Returns 
 
new_seriesseries


New instance of series with reduced degree.
numpy.polynomial.hermite_e.HermiteE.degree method   polynomial.hermite_e.HermiteE.degree()[source]
 
The degree of the series.  New in version 1.5.0.   Returns 
 
degreeint


Degree of the series, one less than the number of coefficients.
numpy.polynomial.hermite_e.HermiteE.deriv method   polynomial.hermite_e.HermiteE.deriv(m=1)[source]
 
Differentiate. Return a series instance of that is the derivative of the current series.  Parameters 
 
mnon-negative int


Find the derivative of order m.    Returns 
 
new_seriesseries


A new series representing the derivative. The domain is the same as the domain of the differentiated series.
numpy.polynomial.hermite_e.HermiteE.domain attribute   polynomial.hermite_e.HermiteE.domain = array([-1, 1])
numpy.polynomial.hermite_e.HermiteE.fit method   classmethod polynomial.hermite_e.HermiteE.fit(x, y, deg, domain=None, rcond=None, full=False, w=None, window=None)[source]
 
Least squares fit to data. Return a series instance that is the least squares fit to the data y sampled at x. The domain of the returned instance can be specified and this will often result in a superior fit with less chance of ill conditioning.  Parameters 
 
xarray_like, shape (M,)


x-coordinates of the M sample points (x[i], y[i]).  
yarray_like, shape (M,)


y-coordinates of the M sample points (x[i], y[i]).  
degint or 1-D array_like


Degree(s) of the fitting polynomials. If deg is a single integer all terms up to and including the deg’th term are included in the fit. For NumPy versions >= 1.11.0 a list of integers specifying the degrees of the terms to include may be used instead.  
domain{None, [beg, end], []}, optional


Domain to use for the returned series. If None, then a minimal domain that covers the points x is chosen. If [] the class domain is used. The default value was the class domain in NumPy 1.4 and None in later versions. The [] option was added in numpy 1.5.0.  
rcondfloat, optional


Relative condition number of the fit. Singular values smaller than this relative to the largest singular value will be ignored. The default value is len(x)*eps, where eps is the relative precision of the float type, about 2e-16 in most cases.  
fullbool, optional


Switch determining nature of return value. When it is False (the default) just the coefficients are returned, when True diagnostic information from the singular value decomposition is also returned.  
warray_like, shape (M,), optional


Weights. If not None, the weight w[i] applies to the unsquared residual y[i] - y_hat[i] at x[i]. Ideally the weights are chosen so that the errors of the products w[i]*y[i] all have the same variance. When using inverse-variance weighting, use w[i] = 1/sigma(y[i]). The default value is None.  New in version 1.5.0.   
window{[beg, end]}, optional


Window to use for the returned series. The default value is the default class domain  New in version 1.6.0.     Returns 
 
new_seriesseries


A series that represents the least squares fit to the data and has the domain and window specified in the call. If the coefficients for the unscaled and unshifted basis polynomials are of interest, do new_series.convert().coef.  
[resid, rank, sv, rcond]list


These values are only returned if full == True  resid – sum of squared residuals of the least squares fit rank – the numerical rank of the scaled Vandermonde matrix sv – singular values of the scaled Vandermonde matrix rcond – value of rcond.  For more details, see linalg.lstsq.
numpy.polynomial.hermite_e.HermiteE.fromroots method   classmethod polynomial.hermite_e.HermiteE.fromroots(roots, domain=[], window=None)[source]
 
Return series instance that has the specified roots. Returns a series representing the product (x - r[0])*(x - r[1])*...*(x - r[n-1]), where r is a list of roots.  Parameters 
 
rootsarray_like


List of roots.  
domain{[], None, array_like}, optional


Domain for the resulting series. If None the domain is the interval from the smallest root to the largest. If [] the domain is the class domain. The default is [].  
window{None, array_like}, optional


Window for the returned series. If None the class window is used. The default is None.    Returns 
 
new_seriesseries


Series with the specified roots.
numpy.polynomial.hermite_e.HermiteE.has_samecoef method   polynomial.hermite_e.HermiteE.has_samecoef(other)[source]
 
Check if coefficients match.  New in version 1.6.0.   Parameters 
 
otherclass instance


The other class must have the coef attribute.    Returns 
 
boolboolean


True if the coefficients are the same, False otherwise.
numpy.polynomial.hermite_e.HermiteE.has_samedomain method   polynomial.hermite_e.HermiteE.has_samedomain(other)[source]
 
Check if domains match.  New in version 1.6.0.   Parameters 
 
otherclass instance


The other class must have the domain attribute.    Returns 
 
boolboolean


True if the domains are the same, False otherwise.
numpy.polynomial.hermite_e.HermiteE.has_sametype method   polynomial.hermite_e.HermiteE.has_sametype(other)[source]
 
Check if types match.  New in version 1.7.0.   Parameters 
 
otherobject


Class instance.    Returns 
 
boolboolean


True if other is same class as self
numpy.polynomial.hermite_e.HermiteE.has_samewindow method   polynomial.hermite_e.HermiteE.has_samewindow(other)[source]
 
Check if windows match.  New in version 1.6.0.   Parameters 
 
otherclass instance


The other class must have the window attribute.    Returns 
 
boolboolean


True if the windows are the same, False otherwise.