A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://numpy.org/doc/stable/reference/generated/numpy.testing.assert_array_max_ulp.html below:

numpy.testing.assert_array_max_ulp — NumPy v2.3 Manual

numpy.testing.assert_array_max_ulp#
testing.assert_array_max_ulp(a, b, maxulp=1, dtype=None)[source]#

Check that all items of arrays differ in at most N Units in the Last Place.

Parameters:
a, barray_like

Input arrays to be compared.

maxulpint, optional

The maximum number of units in the last place that elements of a and b can differ. Default is 1.

dtypedtype, optional

Data-type to convert a and b to if given. Default is None.

Returns:
retndarray

Array containing number of representable floating point numbers between items in a and b.

Raises:
AssertionError

If one or more elements differ by more than maxulp.

Notes

For computing the ULP difference, this API does not differentiate between various representations of NAN (ULP difference between 0x7fc00000 and 0xffc00000 is zero).

Examples

>>> a = np.linspace(0., 1., 100)
>>> res = np.testing.assert_array_max_ulp(a, np.arcsin(np.sin(a)))

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4