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

Method test_equal_nan_default

numpy/testing/tests/test_utils.py:893–902  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

891 assert_raises(AssertionError, assert_allclose, a, b, equal_nan=False)
892
893 def test_equal_nan_default(self):
894 # Make sure equal_nan default behavior remains unchanged. (All
895 # of these functions use assert_array_compare under the hood.)
896 # None of these should raise.
897 a = np.array([np.nan])
898 b = np.array([np.nan])
899 assert_array_equal(a, b)
900 assert_array_almost_equal(a, b)
901 assert_array_less(a, b)
902 assert_allclose(a, b)
903
904 def test_report_max_relative_error(self):
905 a = np.array([0, 1])

Callers

nothing calls this directly

Calls 4

assert_array_equalFunction · 0.90
assert_array_lessFunction · 0.90
assert_allcloseFunction · 0.90

Tested by

no test coverage detected