neulab/docprompting-conala huggingface dataset:
numpy.polynomial.hermite.Hermite.cast method   classmethod polynomial.hermite.Hermite.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.Hermite.convert method   polynomial.hermite.Hermite.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.Hermite.copy method   polynomial.hermite.Hermite.copy()[source]
 
Return a copy.  Returns 
 
new_seriesseries


Copy of self.
numpy.polynomial.hermite.Hermite.cutdeg method   polynomial.hermite.Hermite.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.Hermite.degree method   polynomial.hermite.Hermite.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.Hermite.deriv method   polynomial.hermite.Hermite.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.Hermite.domain attribute   polynomial.hermite.Hermite.domain = array([-1, 1])
numpy.polynomial.hermite.Hermite.fit method   classmethod polynomial.hermite.Hermite.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.Hermite.fromroots method   classmethod polynomial.hermite.Hermite.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.Hermite.has_samecoef method   polynomial.hermite.Hermite.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.Hermite.has_samedomain method   polynomial.hermite.Hermite.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.Hermite.has_sametype method   polynomial.hermite.Hermite.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.Hermite.has_samewindow method   polynomial.hermite.Hermite.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.
numpy.polynomial.hermite.Hermite.identity method   classmethod polynomial.hermite.Hermite.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.Hermite.integ method   polynomial.hermite.Hermite.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.Hermite.linspace method   polynomial.hermite.Hermite.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.Hermite.mapparms method   polynomial.hermite.Hermite.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.Hermite.roots method   polynomial.hermite.Hermite.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.Hermite.trim method   polynomial.hermite.Hermite.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.Hermite.truncate method   polynomial.hermite.Hermite.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.hermline   polynomial.hermite.hermline(off, scl)[source]
 
Hermite 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 Hermite series for off + scl*x.      See also  numpy.polynomial.polynomial.polyline
numpy.polynomial.chebyshev.chebline
numpy.polynomial.legendre.legline
numpy.polynomial.laguerre.lagline
numpy.polynomial.hermite_e.hermeline
  Examples >>> from numpy.polynomial.hermite import hermline, hermval
>>> hermval(0,hermline(3, 2))
3.0
>>> hermval(1,hermline(3, 2))
5.0
numpy.polynomial.hermite.hermmul   polynomial.hermite.hermmul(c1, c2)[source]
 
Multiply one Hermite series by another. Returns the product of two Hermite 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 Hermite series coefficients ordered from low to high.    Returns 
 
outndarray


Of Hermite series coefficients representing their product.      See also  
hermadd, hermsub, hermmulx, hermdiv, hermpow

  Notes In general, the (polynomial) product of two C-series results in terms that are not in the Hermite polynomial basis set. Thus, to express the product as a Hermite 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.hermite import hermmul
>>> hermmul([1, 2, 3], [0, 1, 2])
array([52.,  29.,  52.,   7.,   6.])
numpy.polynomial.hermite.hermmulx   polynomial.hermite.hermmulx(c)[source]
 
Multiply a Hermite series by x. Multiply the Hermite series c by x, where x is the independent variable.  Parameters 
 
carray_like


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


Array representing the result of the multiplication.      See also  
hermadd, hermsub, hermmul, hermdiv, hermpow

  Notes The multiplication uses the recursion relationship for Hermite polynomials in the form  \[xP_i(x) = (P_{i + 1}(x)/2 + i*P_{i - 1}(x))\] Examples >>> from numpy.polynomial.hermite import hermmulx
>>> hermmulx([1, 2, 3])
array([2. , 6.5, 1. , 1.5])
numpy.polynomial.hermite.hermpow   polynomial.hermite.hermpow(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  
hermadd, hermsub, hermmulx, hermmul, hermdiv

  Examples >>> from numpy.polynomial.hermite import hermpow
>>> hermpow([1, 2, 3], 2)
array([81.,  52.,  82.,  12.,   9.])
numpy.polynomial.hermite.hermroots   polynomial.hermite.hermroots(c)[source]
 
Compute the roots of a Hermite series. Return the roots (a.k.a. “zeros”) of the polynomial  \[p(x) = \sum_i c[i] * H_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.chebyshev.chebroots
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 Hermite series basis polynomials aren’t powers of x so the results of this function may seem unintuitive. Examples >>> from numpy.polynomial.hermite import hermroots, hermfromroots
>>> coef = hermfromroots([-1, 0, 1])
>>> coef
array([0.   ,  0.25 ,  0.   ,  0.125])
>>> hermroots(coef)
array([-1.00000000e+00, -1.38777878e-17,  1.00000000e+00])
numpy.polynomial.hermite.hermsub   polynomial.hermite.hermsub(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  
hermadd, hermmulx, hermmul, hermdiv, hermpow

  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 import hermsub
>>> hermsub([1, 2, 3, 4], [1, 2, 3])
array([0.,  0.,  0.,  4.])
numpy.polynomial.hermite.hermtrim   polynomial.hermite.hermtrim(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.hermval   polynomial.hermite.hermval(x, c, tensor=True)[source]
 
Evaluate an Hermite series at points x. If c is of length n + 1, this function returns the value:  \[p(x) = c_0 * H_0(x) + c_1 * H_1(x) + ... + c_n * H_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  
hermval2d, hermgrid2d, hermval3d, hermgrid3d

  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.]])
numpy.polynomial.hermite.hermval2d   polynomial.hermite.hermval2d(x, y, c)[source]
 
Evaluate a 2-D Hermite series at points (x, y). This function returns the values:  \[p(x,y) = \sum_{i,j} c_{i,j} * H_i(x) * H_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  
hermval, hermgrid2d, hermval3d, hermgrid3d

  Notes  New in version 1.7.0.