MCPcopy
hub / github.com/numpy/numpy / assert_array_approx_equal

Function assert_array_approx_equal

numpy/ma/testutils.py:247–258  ·  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

245
246
247def assert_array_approx_equal(x, y, decimal=6, err_msg='', verbose=True):
248 """
249 Checks the equality of two masked arrays, up to given number odecimals.
250
251 The equality is checked elementwise.
252
253 """
254 def compare(x, y):
255 "Returns the result of the loose comparison between x and y)."
256 return approx(x, y, rtol=10. ** -decimal)
257 assert_array_compare(compare, x, y, err_msg=err_msg, verbose=verbose,
258 header='Arrays are not almost equal')
259
260
261def assert_array_almost_equal(x, y, decimal=6, err_msg='', verbose=True):

Callers

nothing calls this directly

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…