earthkit.utils.array.namespace.PatchedJaxNamespace¶
- class earthkit.utils.array.namespace.PatchedJaxNamespace[source]¶
Bases:
UnknownPatchedNamespaceMethods
__init__()allclose(x, y, *[, rtol, atol, equal_nan])choice(a, size[, replace, generator])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
A thread-safe cached property decorator.
- xp¶
A thread-safe cached property decorator.
It was implemented because the functools.cached_property is not thread-safe from Python 3.12 onwards.
- Parameters:
method (property method) – The property method to be decorated.
:param The
__get__method of the decorator only runs on lookups. On first call: :param it gets the underlying property’s value and stores it as the hiddennameattribute: :param of the instance it was called on. Subsequent calls return the cached value: :param i.e. the: :param hiddennameattribute.: