MCPcopy Create free account
hub / github.com/numpy/numpy / assert_array_almost_equal

Function assert_array_almost_equal

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

253
254
255def assert_array_almost_equal(x, y, decimal=6, err_msg='', verbose=True):
256 """
257 Checks the equality of two masked arrays, up to given number odecimals.
258
259 The equality is checked elementwise.
260
261 """
262 def compare(x, y):
263 "Returns the result of the loose comparison between x and y)."
264 return almost(x, y, decimal)
265 assert_array_compare(compare, x, y, err_msg=err_msg, verbose=verbose,
266 header='Arrays are not almost equal')
267
268
269def 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