MCPcopy
hub / github.com/numpy/numpy / assert_array_almost_equal

Function assert_array_almost_equal

numpy/ma/testutils.py:261–272  ·  view source on GitHub ↗

Checks the equality of two masked arrays, up to given number odecimals. The equality is checked elementwise.

(x, y, decimal=6, err_msg='', verbose=True)

Source from the content-addressed store, hash-verified

259
260
261def assert_array_almost_equal(x, y, decimal=6, err_msg='', verbose=True):
262 """
263 Checks the equality of two masked arrays, up to given number odecimals.
264
265 The equality is checked elementwise.
266
267 """
268 def compare(x, y):
269 "Returns the result of the loose comparison between x and y)."
270 return almost(x, y, decimal)
271 assert_array_compare(compare, x, y, err_msg=err_msg, verbose=verbose,
272 header='Arrays are not almost equal')
273
274
275def assert_array_less(x, y, err_msg='', verbose=True):

Callers 1

assert_almost_equalFunction · 0.70

Calls 1

assert_array_compareFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…