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

Function fail_if_array_equal

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

228
229
230def fail_if_array_equal(x, y, err_msg='', verbose=True):
231 """
232 Raises an assertion error if two masked arrays are not equal elementwise.
233
234 """
235 def compare(x, y):
236 return (not np.all(approx(x, y)))
237 assert_array_compare(compare, x, y, err_msg=err_msg, verbose=verbose,
238 header='Arrays are not equal')
239
240
241def 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