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

Method _check_ninf_nan

numpy/core/tests/test_umath_complex.py:92–97  ·  view source on GitHub ↗
(dummy)

Source from the content-addressed store, hash-verified

90
91 # cexp(-inf + nan i) is +-0 +- 0i
92 def _check_ninf_nan(dummy):
93 msgform = "cexp(-inf, nan) is (%f, %f), expected (+-0, +-0)"
94 with np.errstate(invalid='ignore'):
95 z = f(np.array(complex(-np.inf, np.nan)))
96 if z.real != 0 or z.imag != 0:
97 raise AssertionError(msgform % (z.real, z.imag))
98
99 _check_ninf_nan(None)
100

Callers

nothing calls this directly

Calls 1

fFunction · 0.85

Tested by

no test coverage detected