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

  Notes  New in version 1.7.0.
numpy.polynomial.hermite.hermvander   polynomial.hermite.hermvander(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] = H_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 Hermite polynomial. If c is a 1-D array of coefficients of length n + 1 and V is the array V = hermvander(x, n), then np.dot(V, c) and hermval(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 Hermite 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 Hermite polynomial. The dtype will be the same as the converted x.     Examples >>> from numpy.polynomial.hermite import hermvander
>>> x = np.array([-1, 0, 1])
>>> hermvander(x, 3)
array([[ 1., -2.,  2.,  4.],
       [ 1.,  0., -2., -0.],
       [ 1.,  2.,  2., -4.]])
numpy.polynomial.hermite.hermvander2d   polynomial.hermite.hermvander2d(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] = H_i(x) * H_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 Hermite polynomials. If V = hermvander2d(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 hermval2d(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 Hermite 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  
hermvander, hermvander3d, hermval2d, hermval3d

  Notes  New in version 1.7.0.
numpy.polynomial.hermite.hermvander3d   polynomial.hermite.hermvander3d(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 The pseudo-Vandermonde matrix is defined by  \[V[..., (m+1)(n+1)i + (n+1)j + k] = H_i(x)*H_j(y)*H_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 Hermite polynomials. If V = hermvander3d(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 hermval3d(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 Hermite 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  
hermvander, hermvander3d, hermval2d, hermval3d

  Notes  New in version 1.7.0.
numpy.polynomial.hermite.hermweight   polynomial.hermite.hermweight(x)[source]
 
Weight function of the Hermite polynomials. The weight function is \(\exp(-x^2)\) and the interval of integration is \([-\inf, \inf]\). the Hermite 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.poly2herm   polynomial.hermite.poly2herm(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  herm2poly
  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 import poly2herm
>>> poly2herm(np.arange(4))
array([1.   ,  2.75 ,  0.5  ,  0.375])
numpy.polynomial.hermite_e.herme2poly   polynomial.hermite_e.herme2poly(c)[source]
 
Convert a Hermite series to a polynomial. Convert an array representing the coefficients of a Hermite 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 Hermite 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  poly2herme
  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 herme2poly
>>> herme2poly([  2.,  10.,   2.,   3.])
array([0.,  1.,  2.,  3.])
numpy.polynomial.hermite_e.hermeadd   polynomial.hermite_e.hermeadd(c1, c2)[source]
 
Add one Hermite series to another. Returns the sum of two Hermite 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 Hermite series coefficients ordered from low to high.    Returns 
 
outndarray


Array representing the Hermite series of their sum.      See also  
hermesub, hermemulx, hermemul, hermediv, hermepow

  Notes Unlike multiplication, division, etc., the sum of two Hermite series is a Hermite 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.hermite_e import hermeadd
>>> hermeadd([1, 2, 3], [1, 2, 3, 4])
array([2.,  4.,  6.,  4.])
numpy.polynomial.hermite_e.hermecompanion   polynomial.hermite_e.hermecompanion(c)[source]
 
Return the scaled companion matrix of c. The basis polynomials are scaled so that the companion matrix is symmetric when c is an HermiteE basis polynomial. This provides better eigenvalue estimates than the unscaled case and for basis polynomials the eigenvalues are guaranteed to be real if numpy.linalg.eigvalsh is used to obtain them.  Parameters 
 
carray_like


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


Scaled companion matrix of dimensions (deg, deg).     Notes  New in version 1.7.0.
numpy.polynomial.hermite_e.hermeder   polynomial.hermite_e.hermeder(c, m=1, scl=1, axis=0)[source]
 
Differentiate a Hermite_e series. Returns the 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*He_0 + 2*He_1 + 3*He_2 while [[1,2],[1,2]] represents 1*He_0(x)*He_0(y) + 1*He_1(x)*He_0(y)
+ 2*He_0(x)*He_1(y) + 2*He_1(x)*He_1(y) if axis=0 is x and axis=1 is y.  Parameters 
 
carray_like


Array of Hermite_e 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


Hermite series of the derivative.      See also  hermeint
  Notes In general, the result of differentiating a Hermite 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.hermite_e import hermeder
>>> hermeder([ 1.,  1.,  1.,  1.])
array([1.,  2.,  3.])
>>> hermeder([-0.25,  1.,  1./2.,  1./3.,  1./4 ], m=2)
array([1.,  2.,  3.])
numpy.polynomial.hermite_e.hermediv   polynomial.hermite_e.hermediv(c1, c2)[source]
 
Divide one Hermite series by another. Returns the quotient-with-remainder 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 
 
[quo, rem]ndarrays


Of Hermite series coefficients representing the quotient and remainder.      See also  
hermeadd, hermesub, hermemulx, hermemul, hermepow

  Notes In general, the (polynomial) division of one Hermite series by another results in quotient and remainder terms that are not in the Hermite polynomial basis set. Thus, to express these results as a Hermite series, it is necessary to “reproject” the results onto the Hermite basis set, which may produce “unintuitive” (but correct) results; see Examples section below. Examples >>> from numpy.polynomial.hermite_e import hermediv
>>> hermediv([ 14.,  15.,  28.,   7.,   6.], [0, 1, 2])
(array([1., 2., 3.]), array([0.]))
>>> hermediv([ 15.,  17.,  28.,   7.,   6.], [0, 1, 2])
(array([1., 2., 3.]), array([1., 2.]))
numpy.polynomial.hermite_e.hermefromroots   polynomial.hermite_e.hermefromroots(roots)[source]
 
Generate a HermiteE series with given roots. The function returns the coefficients of the polynomial  \[p(x) = (x - r_0) * (x - r_1) * ... * (x - r_n),\] in HermiteE 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 * He_1(x) + ... + c_n * He_n(x)\] The coefficient of the last term is not generally 1 for monic polynomials in HermiteE 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.laguerre.lagfromroots
numpy.polynomial.hermite.hermfromroots
numpy.polynomial.chebyshev.chebfromroots
  Examples >>> from numpy.polynomial.hermite_e import hermefromroots, hermeval
>>> coef = hermefromroots((-1, 0, 1))
>>> hermeval((-1, 0, 1), coef)
array([0., 0., 0.])
>>> coef = hermefromroots((-1j, 1j))
>>> hermeval((-1j, 1j), coef)
array([0.+0.j, 0.+0.j])
numpy.polynomial.hermite_e.hermegauss   polynomial.hermite_e.hermegauss(deg)[source]
 
Gauss-HermiteE quadrature. Computes the sample points and weights for Gauss-HermiteE quadrature. These sample points and weights will correctly integrate polynomials of degree \(2*deg - 1\) or less over the interval \([-\inf, \inf]\) with the weight function \(f(x) = \exp(-x^2/2)\).  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 / (He'_n(x_k) * He_{n-1}(x_k))\] where \(c\) is a constant independent of \(k\) and \(x_k\) is the k’th root of \(He_n\), and then scaling the results to get the right value when integrating 1.
numpy.polynomial.hermite_e.hermegrid2d   polynomial.hermite_e.hermegrid2d(x, y, c)[source]
 
Evaluate a 2-D HermiteE series on the Cartesian product of x and y. This function returns the values:  \[p(a,b) = \sum_{i,j} c_{i,j} * H_i(a) * H_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.  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 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  
hermeval, hermeval2d, hermeval3d, hermegrid3d

  Notes  New in version 1.7.0.
numpy.polynomial.hermite_e.hermegrid3d   polynomial.hermite_e.hermegrid3d(x, y, z, c)[source]
 
Evaluate a 3-D HermiteE 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} * He_i(a) * He_j(b) * He_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  
hermeval, hermeval2d, hermegrid2d, hermeval3d

  Notes  New in version 1.7.0.
numpy.polynomial.hermite_e.hermeint   polynomial.hermite_e.hermeint(c, m=1, k=[], lbnd=0, scl=1, axis=0)[source]
 
Integrate a Hermite_e series. Returns the Hermite_e 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 H_0 + 2*H_1 + 3*H_2 while [[1,2],[1,2]] represents 1*H_0(x)*H_0(y) + 1*H_1(x)*H_0(y) + 2*H_0(x)*H_1(y) +
2*H_1(x)*H_1(y) if axis=0 is x and axis=1 is y.  Parameters 
 
carray_like


Array of Hermite_e 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


Hermite_e series coefficients of the integral.    Raises 
 ValueError

If m < 0, len(k) > m, np.ndim(lbnd) != 0, or np.ndim(scl) != 0.      See also  hermeder
  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.hermite_e import hermeint
>>> hermeint([1, 2, 3]) # integrate once, value 0 at 0.
array([1., 1., 1., 1.])
>>> hermeint([1, 2, 3], m=2) # integrate twice, value & deriv 0 at 0
array([-0.25      ,  1.        ,  0.5       ,  0.33333333,  0.25      ]) # may vary
>>> hermeint([1, 2, 3], k=1) # integrate once, value 1 at 0.
array([2., 1., 1., 1.])
>>> hermeint([1, 2, 3], lbnd=-1) # integrate once, value 0 at -1
array([-1.,  1.,  1.,  1.])
>>> hermeint([1, 2, 3], m=2, k=[1, 2], lbnd=-1)
array([ 1.83333333,  0.        ,  0.5       ,  0.33333333,  0.25      ]) # may vary
numpy.polynomial.hermite_e.hermeline   polynomial.hermite_e.hermeline(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.hermline
  Examples >>> from numpy.polynomial.hermite_e import hermeline
>>> from numpy.polynomial.hermite_e import hermeline, hermeval
>>> hermeval(0,hermeline(3, 2))
3.0
>>> hermeval(1,hermeline(3, 2))
5.0
numpy.polynomial.hermite_e.hermemul   polynomial.hermite_e.hermemul(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  
hermeadd, hermesub, hermemulx, hermediv, hermepow

  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_e import hermemul
>>> hermemul([1, 2, 3], [0, 1, 2])
array([14.,  15.,  28.,   7.,   6.])
numpy.polynomial.hermite_e.hermemulx   polynomial.hermite_e.hermemulx(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.     Notes The multiplication uses the recursion relationship for Hermite polynomials in the form  \[xP_i(x) = (P_{i + 1}(x) + iP_{i - 1}(x)))\] Examples >>> from numpy.polynomial.hermite_e import hermemulx
>>> hermemulx([1, 2, 3])
array([2.,  7.,  2.,  3.])