numpy.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, b : array_like Input arrays to be compared. maxulp : int, optional The maximum number of units in the last place that elements of dtype : dtype, optional Data-type to convert |
---|---|
Returns: |
ret : ndarray Array containing number of representable floating point numbers between items in |
Raises: |
AssertionError If one or more elements differ by more than |
See also
assert_array_almost_equal_nulp
>>> a = np.linspace(0., 1., 100) >>> res = np.testing.assert_array_max_ulp(a, np.arcsin(np.sin(a)))
© 2008–2017 NumPy Developers
Licensed under the NumPy License.
https://docs.scipy.org/doc/numpy-1.14.2/reference/generated/numpy.testing.assert_array_max_ulp.html