MCPcopy Index your code
hub / github.com/numpy/numpy / test_zero_division

Method test_zero_division

numpy/_core/tests/test_scalarmath.py:411–426  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

409
410class TestComplexDivision:
411 def test_zero_division(self):
412 with np.errstate(all="ignore"):
413 for t in [np.complex64, np.complex128]:
414 a = t(0.0)
415 b = t(1.0)
416 assert_(np.isinf(b / a))
417 b = t(complex(np.inf, np.inf))
418 assert_(np.isinf(b / a))
419 b = t(complex(np.inf, np.nan))
420 assert_(np.isinf(b / a))
421 b = t(complex(np.nan, np.inf))
422 assert_(np.isinf(b / a))
423 b = t(complex(np.nan, np.nan))
424 assert_(np.isnan(b / a))
425 b = t(0.)
426 assert_(np.isnan(b / a))
427
428 def test_signed_zeros(self):
429 with np.errstate(all="ignore"):

Callers

nothing calls this directly

Calls 2

assert_Function · 0.90
tFunction · 0.85

Tested by

no test coverage detected