MCPcopy
hub / github.com/numpy/numpy / fail_if_array_equal

Function fail_if_array_equal

numpy/ma/testutils.py:236–244  ·  view source on GitHub ↗

Raises an assertion error if two masked arrays are not equal elementwise.

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

Source from the content-addressed store, hash-verified

234
235
236def fail_if_array_equal(x, y, err_msg='', verbose=True):
237 """
238 Raises an assertion error if two masked arrays are not equal elementwise.
239
240 """
241 def compare(x, y):
242 return (not np.all(approx(x, y)))
243 assert_array_compare(compare, x, y, err_msg=err_msg, verbose=verbose,
244 header='Arrays are not equal')
245
246
247def assert_array_approx_equal(x, y, decimal=6, err_msg='', verbose=True):

Callers 1

fail_if_equalFunction · 0.85

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…