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

Method test_exp_strides

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

Source from the content-addressed store, hash-verified

1395 assert_almost_equal(np.exp(yf), xf)
1396
1397 def test_exp_strides(self):
1398 np.random.seed(42)
1399 strides = np.array([-4,-3,-2,-1,1,2,3,4])
1400 sizes = np.arange(2,100)
1401 for ii in sizes:
1402 x_f64 = np.float64(np.random.uniform(low=0.01, high=709.1,size=ii))
1403 y_true = np.exp(x_f64)
1404 for jj in strides:
1405 assert_array_almost_equal_nulp(np.exp(x_f64[::jj]), y_true[::jj], nulp=2)
1406
1407class TestSpecialFloats:
1408 def test_exp_values(self):

Callers

nothing calls this directly

Calls 2

uniformMethod · 0.80

Tested by

no test coverage detected