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

Method test_ldexp

numpy/core/tests/test_umath.py:2242–2250  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2240 np.array(3, tp)), 16.)
2241
2242 def test_ldexp(self):
2243 # The default Python int type should work
2244 assert_almost_equal(ncu.ldexp(2., 3), 16.)
2245 # The following int types should all be accepted
2246 self._check_ldexp(np.int8)
2247 self._check_ldexp(np.int16)
2248 self._check_ldexp(np.int32)
2249 self._check_ldexp('i')
2250 self._check_ldexp('l')
2251
2252 def test_ldexp_overflow(self):
2253 # silence warning emitted on overflow

Callers

nothing calls this directly

Calls 2

_check_ldexpMethod · 0.95
assert_almost_equalFunction · 0.90

Tested by

no test coverage detected