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

Function within_tol

numpy/core/numeric.py:2330–2332  ·  view source on GitHub ↗
(x, y, atol, rtol)

Source from the content-addressed store, hash-verified

2328 array([False, True])
2329 """
2330 def within_tol(x, y, atol, rtol):
2331 with errstate(invalid='ignore'), _no_nep50_warning():
2332 return less_equal(abs(x-y), atol + rtol * abs(y))
2333
2334 x = asanyarray(a)
2335 y = asanyarray(b)

Callers 1

iscloseFunction · 0.85

Calls 4

errstateClass · 0.85
_no_nep50_warningFunction · 0.85
absFunction · 0.85
less_equalFunction · 0.70

Tested by

no test coverage detected