earthkit.utils.array.namespace.UnknownPatchedNamespace¶
- class earthkit.utils.array.namespace.UnknownPatchedNamespace(xp)[source]¶
Bases:
objectMethods
__init__(xp)allclose(x, y, *[, rtol, atol, equal_nan])deg2rad(x)device(x)dtype(x)histogram2d(x, y, *[, bins])Compute a 2D histogram.
histogramdd(x, *[, bins])isclose(x, y, *[, rtol, atol, equal_nan])percentile(a, q[, axis])Compute percentiles by calling the quantile function.
polyval(x, c)Evaluation of a polynomial using Horner's scheme.
quantile(a, q[, axis])rad2deg(x)shape(x)Return the shape of an array.
size(x)Return the size of an array.
to_device(x, device, **kwargs)Attributes
- histogram2d(x, y, *, bins=10)[source]¶
Compute a 2D histogram.
- Parameters:
x (array-like) – An array containing the x coordinates of the points to be histogrammed.
y (array-like) – An array containing the y coordinates of the points to be histogrammed.
bins (int or list of int, optional) – The number of bins for the histogram in each dimension. If bins is an int, it is used for both dimensions.
- polyval(x, c)[source]¶
Evaluation of a polynomial using Horner’s scheme.
If
cis of lengthn + 1, this function returns the value\[p(x) = c_0 + c_1 * x + ... + c_n * x^n\]- Parameters:
x (array-like) – The values(s) at which to evaluate the polynomial. Its elements must support addition and multiplication with with themselves and with the elements of
c.c (array-like) – Array of coefficients ordered so that the coefficients for terms of degree n are contained in c[n].
- Returns:
values – The value(s) of the polynomial at the given point(s).
- Return type:
array-like
- property xp¶
Comments¶
Based on the
numpy.polynomal.polynomial.polyvalfunction.