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

Method tst_isclose_allclose

numpy/core/tests/test_numeric.py:2579–2585  ·  view source on GitHub ↗
(self, x, y)

Source from the content-addressed store, hash-verified

2577 assert_(not np.any(np.isclose(x, y)), msg % (x, y))
2578
2579 def tst_isclose_allclose(self, x, y):
2580 msg = "isclose.all() and allclose aren't same for %s and %s"
2581 msg2 = "isclose and allclose aren't same for %s and %s"
2582 if np.isscalar(x) and np.isscalar(y):
2583 assert_(np.isclose(x, y) == np.allclose(x, y), msg=msg2 % (x, y))
2584 else:
2585 assert_array_equal(np.isclose(x, y).all(), np.allclose(x, y), msg % (x, y))
2586
2587 def test_ip_all_isclose(self):
2588 self._setup()

Callers 1

Calls 3

assert_Function · 0.90
assert_array_equalFunction · 0.90
allMethod · 0.45

Tested by

no test coverage detected