Movatterモバイル変換


[0]ホーム

URL:


SciPy

numpy.testing.assert_array_max_ulp

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 ofa andb can differ. Default is 1.

dtype : dtype, optional

Data-type to converta andb to if given. Default is None.

Returns:

ret : ndarray

Array containing number of representable floating point numbers betweenitems ina andb.

Raises:

AssertionError

If one or more elements differ by more thanmaxulp.

See also

assert_array_almost_equal_nulp
Compare two arrays relatively to their spacing.

Examples

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

Previous topic

numpy.testing.assert_array_almost_equal_nulp

Next topic

numpy.testing.assert_array_equal

  • © Copyright 2008-2009, The Scipy community.
  • Last updated on Jun 10, 2017.
  • Created usingSphinx 1.5.3.

[8]ページ先頭

©2009-2025 Movatter.jp